How to Sync a Mouse Between Two Computers
In this article
Sharing one mouse between two computers lets you control both machines with a single cursor, moving seamlessly from one screen to the other as if they were one large desktop. You no longer need to unplug and replug a USB receiver or juggle two mice. This guide covers the two main methods: using a software KVM (keyboard, video, mouse) solution for Windows, macOS, and Linux, and using a hardware KVM switch for a more physical setup. Before you start, make sure both computers are on the same local network (wired or Wi‑Fi) and that you have administrator access to install software if needed.
What You'll Need
- Two computers (desktop or laptop) running Windows, macOS, or Linux
- Both computers connected to the same network (Ethernet or Wi‑Fi)
- Administrator rights on both machines to install software
- For the hardware method: a USB KVM switch and the necessary cables (HDMI, DisplayPort, USB)
- Optional: a second monitor if you want each computer to have its own display
Step-by-Step
Method 1: Using Software (Mouse Without Borders / Barrier)
- Choose your software. For Windows, Microsoft's free Mouse without Borders is a popular choice. For cross‑platform (Windows, macOS, Linux), use Barrier (open source, based on Synergy). Download the installer from the official website or a trusted repository.
- Install on both computers. Run the installer on each machine. Accept the license and follow the prompts. You may need to restart after installation.
- Set the server and client. On the computer whose keyboard and mouse you will physically use, launch the software and choose “Server” (or “This computer shares its mouse”). On the other computer, choose “Client” (or “This computer uses the shared mouse”).
- Enter the server’s IP address. On the client, you’ll be asked for the server’s IP address. Find it on the server (e.g., in Settings > Network & Internet > Wi‑Fi properties on Windows, or System Preferences > Network on macOS). Type that IP into the client and click “Connect” or “Start”.
- Arrange the screens. In the server’s settings, you’ll see a grid representing your monitors. Drag the monitor icons to match the physical layout (e.g., if the client monitor is to the right of the server, place the client icon to the right). This determines how the cursor moves between screens.
- Test the connection. Move your mouse to the edge of the server screen that faces the client. The cursor should appear on the client’s screen. If not, check the network connection and that both firewalls allow the software (you may need to add an exception).
- Adjust settings (optional). Most software lets you set a hotkey to switch control, disable screen saver synchronization, or share the clipboard. Explore the settings to fine‑tune the experience.
Method 2: Using a Hardware KVM Switch
- Choose a KVM switch. Select a switch that supports your video connections (HDMI, DisplayPort, VGA) and the number of computers you have. For two computers, a 2‑port KVM is sufficient.
- Connect the KVM to your computers. Plug the KVM’s USB cable (for keyboard and mouse) into the computers’ USB ports. Connect the video cables from each computer’s graphics output to the corresponding inputs on the KVM.
- Connect your keyboard and mouse. Plug your keyboard and mouse into the dedicated USB ports on the KVM (often labeled “Console” or “Peripherals”).
- Connect a monitor to the KVM. Use a video cable to connect the KVM’s output to your monitor.
- Power on the KVM. Some KVMs have a power adapter; others draw power from the USB connection. Follow the manufacturer’s instructions.
- Switch between computers. Use the KVM’s button (usually on the front panel) or a keyboard hotkey (e.g., Scroll Lock + Scroll Lock) to toggle between computer 1 and computer 2. Your mouse and keyboard will control whichever computer is currently selected.
Common Mistakes
- Wrong IP address: Typing the wrong IP on the client is the most frequent error. Double‑check the server’s IP and make sure both devices are on the same subnet.
- Firewall blocking: Windows Firewall or third‑party security software may block the connection. Add an exception for the mouse‑sharing software on both computers.
- Screen layout misconfigured: If the cursor moves to the wrong edge, the monitor arrangement in the software doesn’t match the physical setup. Re‑arrange the icons in the settings.
- Using the wrong USB port on the KVM: Some KVMs have separate ports for keyboard and mouse; plugging them into the wrong ports can cause them not to work.
- Not installing on both computers: The software must be installed on both machines; otherwise, the connection fails.
Tips
- Use a wired network for stability. Wi‑Fi works, but a wired Ethernet connection reduces latency and dropped connections.
- Set a hotkey for quick switching. If you prefer to use a keyboard shortcut to jump between computers, configure it in the software settings.
- Share the clipboard. Most software allows copy‑and‑paste between computers, which is handy for transferring text or small data.
- Keep both computers on the same power plan. If one goes to sleep, the connection drops. Adjust sleep settings to avoid interruptions.
- For KVM switches, choose one with good cable length. Make sure the cables are long enough to reach both computers comfortably.
Troubleshooting
- Cursor won’t move to the other screen. Check that the client is connected (look for a status indicator in the software). Verify the IP address and that both computers are on the same network. Restart both software instances.
- Connection drops frequently. This is often due to Wi‑Fi interference or power saving. Switch to Ethernet, disable power saving on the network adapters, and ensure both computers are not set to sleep too quickly.
- Mouse works but keyboard doesn’t. In software, check the settings for keyboard sharing—some apps require you to enable it. For KVM, try swapping the keyboard and mouse ports.
- Software won’t install. Make sure you have administrator privileges. On macOS, you may need to go to System Preferences > Security & Privacy and allow the app.
- KVM switch not detecting a computer. Check the video cable connections and that the computer’s graphics output is active. Try a different cable or port on the KVM.
- Cursor moves but clicks don’t register. This can happen if the client’s operating system is not responding or if the software’s permissions are not granted. Re‑install the software or check the client’s system logs.
Frequently Asked Questions
Can I share a mouse between a Windows PC and a Mac?
Yes. Use Barrier (or Synergy) which supports cross‑platform sharing. The setup is the same: install on both, set one as server and the other as client.
Do both computers need to be on the same Wi‑Fi network?
Yes, they must be on the same local network (same router) for the software to communicate. A wired connection is more reliable but not required.
Can I share a mouse between more than two computers?
Yes. Software like Mouse without Borders supports up to 4 computers. Hardware KVMs come in 2, 4, or 8‑port versions.
Will the mouse work when the computers are locked?
Generally, yes. The software sends the cursor movement to the client, so you can move the mouse even if the client is at the login screen. However, you may need to click to focus the login field.
Is there any lag when using a software solution?
On a wired network, lag is minimal. Over Wi‑Fi, you may notice slight delay, especially with high‑resolution mice. Hardware KVM switches have zero lag because they physically switch the USB connection.
Can I share the clipboard between computers?
Yes, most software solutions include clipboard sharing. Copy text on one computer and paste it on the other. File transfer is usually not supported, but you can drag‑and‑drop files in some apps like Barrier.