Share Mouse and Keyboard Between Windows and Mac
In this article
You can share a mouse and keyboard between Windows and Mac using software known as a KVM switch or a virtual keyboard/mouse sharing app. The most reliable method is using a third-party software solution like Barrier or Synergy, which allows you to move your cursor off the edge of one screen and onto the other as if they were a single extended desktop, despite being two different computers with different operating systems. This eliminates the need for physical hardware switches and allows you to control both machines with one set of peripherals.
What You'll Need
- A Windows PC and a Mac, both powered on and connected to the same local area network (LAN).
- A shared network connection (Ethernet is highly recommended for lower latency, though Wi-Fi works).
- Administrator privileges on both machines to install software and modify firewall settings.
- A mouse and keyboard connected to one of the machines (this will be your "Server").
- Software installed on both machines (Barrier is a popular open-source choice).
Step-by-Step
Note: Menu labels may differ slightly depending on the version of the software or the operating system version you are using.
- Install the Software: Download and install the sharing software (such as Barrier) on both the Windows PC and the Mac. Ensure you are using the same version of the software on both devices to avoid compatibility issues.
- Designate the Server: Decide which computer has the mouse and keyboard physically plugged into it. This machine will act as the "Server." On this machine, open the application and select the option to act as the server.
- Configure the Server: Click on the "Configure Server" button. You will see a grid representing your screen. Drag the computer icon from the top right corner and drop it onto the grid relative to where your other computer is physically located (e.g., if the Mac is to the right of the Windows PC, place the Mac icon to the right of the center icon).
- Name the Client: Double-click the new icon you just placed on the grid. In the "Screen Name" field, enter the exact name of the other computer. You can find the computer name in the system settings of the client machine. Click OK and then Save/Apply.
- Set Up the Client: On the second computer (the "Client"), open the application and select the option to act as the client.
- Link to Server: In the "Server IP" field on the client machine, enter the IP address displayed on the server machine's main screen. This is typically a series of numbers like 192.168.1.XX.
- Establish Connection: Click "Start" or "Connect" on the client machine. Once the connection is successful, the status bar should indicate that it is connected to the server.
- Test the Transition: Move your mouse cursor to the edge of the server screen that faces the client machine. The cursor should glide seamlessly onto the second screen, and your keyboard input will now control that machine.
Common Mistakes
One of the most frequent errors is a mismatch in screen names. The server requires the client's name to be exactly the same as what is reported by the client software, including capitalization. If the client identifies itself as "MacBook-Pro" but the server is looking for "macbook-pro," the connection will fail.
Another common mistake is ignoring the network environment. Users often attempt to connect devices that are on different network bands (e.g., one on 2.4GHz Wi-Fi and one on 5GHz Wi-Fi) or different VLANs. While some routers bridge these, many treat them as separate networks, preventing the server and client from communicating.
Finally, many users forget to grant the necessary permissions on macOS. Modern versions of macOS require you to explicitly allow apps to control the computer under Accessibility settings. If you skip this, the mouse may move to the Mac screen, but you will be unable to click anything or type.
Tips
For the smoothest experience, use a wired Ethernet connection for both machines. Wireless interference can cause "cursor jump," where the mouse stutters or lags as it moves between screens, which can be frustrating during precise tasks like photo editing or coding.
If you use a keyboard with specialized media keys or macros, be aware that these may not always translate perfectly between Windows and Mac. You may need to check the software settings to remap the Command key on Mac to the Windows key on PC, or vice versa, to maintain a consistent workflow.
To increase security, ensure that you only run this software on a trusted home or office network. Since the software opens a port for communication, using it on a public Wi-Fi network without a VPN could potentially expose your machine to unauthorized access if the software is not properly encrypted.
Troubleshooting
If the connection fails, start with the simplest check: restart both the software and the computers. Often, a hung network process is the culprit.
If the client cannot find the server, check your firewalls. On Windows, you may need to go to the Windows Defender Firewall settings and allow the specific application to communicate through the firewall for both Private and Public networks. On Mac, check System Settings > Network > Firewall to ensure the app is permitted to receive incoming connections.
If the mouse moves to the other screen but you cannot click or type, go to the Mac's System Settings > Privacy & Security > Accessibility. Find the sharing software in the list and ensure the toggle is turned on. You may need to click the lock icon or enter your password to make this change.
If the cursor is "stuck" on one screen and won't move to the other, double-check the server configuration grid. Ensure the client icon is placed exactly where the physical monitor is located. If the icon is on the left but the monitor is on the right, the mouse will not cross over where you expect it to.
If you experience significant lag, try disabling any active VPNs on either machine. VPNs often reroute network traffic through a remote server, which can prevent local devices from seeing each other or add significant latency to the cursor movement.
Frequently Asked Questions
Can I share a clipboard between Windows and Mac?
Yes, most virtual KVM software supports a shared clipboard. This allows you to copy text or a small file on your Windows PC and paste it directly onto your Mac, provided the software is running and connected on both ends.
Does this work with Bluetooth mice and keyboards?
Yes. The software doesn't care how the peripherals are connected to the server machine. Whether you use a USB cable, a 2.4GHz dongle, or Bluetooth, the software simply captures those inputs and sends them over the network to the client.
Will this work for gaming on the client machine?
It is generally not recommended for fast-paced gaming. Because the input is sent over a network, there is a slight delay (latency) that can be noticeable in competitive games. For productivity and general use, however, it is virtually seamless.
Do I need a special hardware switch?
No, the software method described here replaces the need for a physical KVM switch. A physical switch requires cables running from both computers into a box, whereas this method uses your existing network connection.
Can I control more than two computers?
Yes, most of these applications allow you to add multiple clients. You can arrange several computers in the server grid (e.g., a Windows PC in the middle, a Mac on the left, and a laptop on the right) and move your mouse across all of them.
Is there a way to do this without installing software?
Not for a seamless "glide-over" experience. The only non-software alternative is a physical KVM switch, which is a hardware device that you plug your peripherals into and then toggle a physical button to switch between computers.