I would really like to not have to switch keyboards and mouse when I switch between my PC and my Pi. I have both wired (PC) and wireless (Pi) keyboard and mouse.
Any tricks I should know about? How can I get another wireless adaptor that I use with Pi to go into PC?
Roger
Re: Best way to share keyboard and mouse between Pi and PC
I'm just started using a program called Barrier, it's available for WIndows, and is in the Pi repos. Works great. ONce keyboard/mouse over my laptop (running WIndows and Lubuntu in a VBox) and the Pi.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.
Re: Best way to share keyboard and mouse between Pi and PC
Not seen that one before. Will have to give it a go. Looks like Barrier is a fork of Synergy.
What is it?
Barrier is software that mimics the functionality of a KVM switch, which historically would allow you to use a single keyboard and mouse to control multiple computers by physically turning a dial on the box to switch the machine you're controlling at any given moment. Barrier does this in software, allowing you to tell it which machine to control by moving your mouse to the edge of the screen, or by using a keypress to switch focus to a different system.
Barrier was forked from Symless's Synergy 1.9 codebase. Synergy was a commercialized reimplementation of the original CosmoSynergy written by Chris Schoeneman.
-
- Posts: 14391
- Joined: Fri Mar 09, 2012 7:36 pm
- Location: Vallejo, CA (US)
Re: Best way to share keyboard and mouse between Pi and PC
I keep it simple, though not cheap, with a KVM switch I can share keyboard, mouse and display among several computers, of which--at the moment--4 are Pis. An alternative way to "share" would be VNC.
Re: Best way to share keyboard and mouse between Pi and PC
A poor man's KVM is a separate low-cost keyboard+mouse+VGA KVM plus domestic HDMI selector.
-
- Posts: 17
- Joined: Tue May 19, 2020 4:23 pm
Re: Best way to share keyboard and mouse between Pi and PC
I use a Ugreen sharing switched usb hub. Four usb devices can be switched between two machines. Currently my Windows PC and Raspberry Pi. You press a button on the top to switch. It works really well. I have my Rasberry Pi branded keyboard and mouse, and a webcam running through it at the moment. I went for USB2 but USB3 models are available. For keyboards and mice it did not seem worth the extra cost. They are about £20.
I did have a full KVM switch in the days of VGA but it never seemed to work properly. And now I have multiple screens.
Best wishes, Stephen.
I did have a full KVM switch in the days of VGA but it never seemed to work properly. And now I have multiple screens.
Best wishes, Stephen.
Re: Best way to share keyboard and mouse between Pi and PC
I use : x2vnc as client on the Linux/Pi side, interfacing a VNC server in the Windows PC (in my case, tightVNC). Plus autocusel on the Pi for keyboard sharing.
Re: Best way to share keyboard and mouse between Pi and PC
This I use:
also used this before, for switching between two setups only (until I upgraded to the one above)
and all the while I use RealVNC and SSH in between....
also used this before, for switching between two setups only (until I upgraded to the one above)
and all the while I use RealVNC and SSH in between....
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"
Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"
Come to me with 'problems' and I'll help you find solutions"
Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"
Re: Best way to share keyboard and mouse between Pi and PC
Synergy (1) is awesome! I've been using it with the pi as the server and my work and personal laptop for about a year.
Cheap and works great.
Cheap and works great.
Re: Best way to share keyboard and mouse between Pi and PC
I use Barrier at work and have the Windows computer as server and my Linux as the client, as I mostly use the Windows computer and some times the Linux computer.
Barrier works by sending keyboard presses and mouse movements to the other computer when the mouse is moved to the screen(s) of the other computer. It's a configuration in the server on where which computer is in relation to the other.
So move the mouse curser to one side and it appears on the other computer and the keyboard follows the mouse.
It works fine most of the time, but if the connection fails, then your client can end up in the middle of a keystroke, which works like you are continuously pressing a key. So your client screen fills up with that key press.
My problems are probably caused by the company wifi network, so you may not experience any problems. Wifi is less solid compared to a wired network...
/Mogens
Barrier works by sending keyboard presses and mouse movements to the other computer when the mouse is moved to the screen(s) of the other computer. It's a configuration in the server on where which computer is in relation to the other.
So move the mouse curser to one side and it appears on the other computer and the keyboard follows the mouse.
It works fine most of the time, but if the connection fails, then your client can end up in the middle of a keystroke, which works like you are continuously pressing a key. So your client screen fills up with that key press.
My problems are probably caused by the company wifi network, so you may not experience any problems. Wifi is less solid compared to a wired network...
/Mogens
-
- Posts: 14391
- Joined: Fri Mar 09, 2012 7:36 pm
- Location: Vallejo, CA (US)
Re: Best way to share keyboard and mouse between Pi and PC
I actually have two KVM switches. One is an 8-port unit that switches PS/2 ports for mouse and keyboard plus VGA for the monitor. The other is an HDMI/USB 4-port switch. The Pis are--obviously--connected to the HDMI/USB switch. The output from that goes through an HDMI to VGA converter to one port of the PS2/VGA switch, with the USB output going through a one USB to two PS/2 adapter. It works just fine. Someday I intend to get an 8-port HDMI/USB switch. At that point, that will become the main switch and both the others will feed ports on it. The only problem being that a good 8-port HDMI/USB KVM runs about $1500, and that's not going to be in the budget for quite a while.StephenMorton wrote: ↑Tue May 19, 2020 4:37 pmI use a Ugreen sharing switched usb hub. Four usb devices can be switched between two machines. Currently my Windows PC and Raspberry Pi. You press a button on the top to switch. It works really well. I have my Rasberry Pi branded keyboard and mouse, and a webcam running through it at the moment. I went for USB2 but USB3 models are available. For keyboards and mice it did not seem worth the extra cost. They are about £20.
I did have a full KVM switch in the days of VGA but it never seemed to work properly. And now I have multiple screens.
And just to complete the picture...sitting on top of the 8-port KVM is a 24-port GbE switch.
-
- Posts: 17
- Joined: Tue May 19, 2020 4:23 pm
Re: Best way to share keyboard and mouse between Pi and PC
I would like to try a HDMI USB KVM switch hub. As you say they are so expensive. The price seems to go up out of proportion as you add more input ports. Difficult to justify so much money on a KVM when the Raspberry PI is such good value. Hopefully the price will come down.W. H. Heydt wrote: ↑Tue May 19, 2020 10:24 pmI actually have two KVM switches. One is an 8-port unit that switches PS/2 ports for mouse and keyboard plus VGA for the monitor. The other is an HDMI/USB 4-port switch. The Pis are--obviously--connected to the HDMI/USB switch. The output from that goes through an HDMI to VGA converter to one port of the PS2/VGA switch, with the USB output going through a one USB to two PS/2 adapter. It works just fine. Someday I intend to get an 8-port HDMI/USB switch. At that point, that will become the main switch and both the others will feed ports on it. The only problem being that a good 8-port HDMI/USB KVM runs about $1500, and that's not going to be in the budget for quite a while.StephenMorton wrote: ↑Tue May 19, 2020 4:37 pmI use a Ugreen sharing switched usb hub. Four usb devices can be switched between two machines. Currently my Windows PC and Raspberry Pi. You press a button on the top to switch. It works really well. I have my Rasberry Pi branded keyboard and mouse, and a webcam running through it at the moment. I went for USB2 but USB3 models are available. For keyboards and mice it did not seem worth the extra cost. They are about £20.
I did have a full KVM switch in the days of VGA but it never seemed to work properly. And now I have multiple screens.
And just to complete the picture...sitting on top of the 8-port KVM is a 24-port GbE switch.
- cstuettgen
- Posts: 23
- Joined: Wed Jan 08, 2020 6:44 pm
- Location: USA, Texas
- Contact: Website
Re: Best way to share keyboard and mouse between Pi and PC
@Stephen Morton,
I use this one in my network rack to connect to my RPi4's. Full 1080p for $75.00 I think it's pretty reasonable.
https://www.amazon.com/gp/product/B07H2ZDJKW
Edit: I forgot to mention it has built-in USB 2.0 hub which gets mapped to the active system, which is handy for transferring files.
I use this one in my network rack to connect to my RPi4's. Full 1080p for $75.00 I think it's pretty reasonable.

https://www.amazon.com/gp/product/B07H2ZDJKW
Edit: I forgot to mention it has built-in USB 2.0 hub which gets mapped to the active system, which is handy for transferring files.
Re: Best way to share keyboard and mouse between Pi and PC
Have been using Barrier with Raspberrypi 4B and Windows 10. Found it to be very useful to cut from Windows 10 and Paste to the Raspberrypi. Only problem I have is how to active Barrier on both the Raspberrypi and the Windows 10 at startup. Has anyone succeeded?
-
- Posts: 1352
- Joined: Sat Nov 09, 2019 12:14 pm
Re: Best way to share keyboard and mouse between Pi and PC
What are the (substantive) differences between the (free version of) Synergy and "Barrier"?
I've been using (free) Synergy for a long time and find it quite useful. There are a few quirks (including that it is badly documented), but I've learned to live with them. Will Barrier make my life better?
I've been using (free) Synergy for a long time and find it quite useful. There are a few quirks (including that it is badly documented), but I've learned to live with them. Will Barrier make my life better?
GitD's list of things that are not ready for prime time:
1) IPv6
2) 64 bit OSes
3) USB 3
4) Bluetooth
Loves Linux; loves to dance.
1) IPv6
2) 64 bit OSes
3) USB 3
4) Bluetooth
Loves Linux; loves to dance.
Re: Best way to share keyboard and mouse between Pi and PC
Yes I have - both running as a service without problems.irianr wrote: ↑Thu May 21, 2020 11:02 amHave been using Barrier with Raspberrypi 4B and Windows 10. Found it to be very useful to cut from Windows 10 and Paste to the Raspberrypi. Only problem I have is how to active Barrier on both the Raspberrypi and the Windows 10 at startup. Has anyone succeeded?
What's the problem you are experiencing?
Are you sure it's not a firewall problem?
/Mogens
-
- Posts: 14391
- Joined: Fri Mar 09, 2012 7:36 pm
- Location: Vallejo, CA (US)
Re: Best way to share keyboard and mouse between Pi and PC
Here's https://www.amazon.com/CKLau-Control-Co ... B07HRBBLWN a version that handles 4K video, for not much more ($90). And an 8-port from the same company, https://www.amazon.com/CKLau-Supports-K ... B07NW3KXPW for a quite reasonable $280.cstuettgen wrote: ↑Wed May 20, 2020 7:53 pm@Stephen Morton,
I use this one in my network rack to connect to my RPi4's. Full 1080p for $75.00 I think it's pretty reasonable.
https://www.amazon.com/gp/product/B07H2ZDJKW
hdmi_kvm_2.jpg
Edit: I forgot to mention it has built-in USB 2.0 hub which gets mapped to the active system, which is handy for transferring files.
Edit to add... Something to drool over. For $400, https://www.amazon.com/CKLau-Supports-K ... B07NW3KXPW a *16*-port 4K switch.
Re: Best way to share keyboard and mouse between Pi and PC
At the other end of the spectrum is a ten cent DPDT slide switch. Out of several setups with Pi sharing a PC half use that and a couple with relay, button, and IR remote sensor. Both methods depend on using a keyboard/mouse USB dongle. Logitech being the most reliable with Unifying feature to allow more than one of each. That last fancy schmacy way was way over ten cents (almost one dollar, lol).