Skip to content

Fork of Synergy that allows for support of Chrome OS/Android using an HID

License

Notifications You must be signed in to change notification settings

alexvanyo/hid-synergy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HID Synergy

This is a fork of the open source core component of Synergy, a keyboard and mouse sharing tool. For compilation and configuration, check the main repo.

One current limitation of Synergy is the relatively powerful control it needs to control the mouse and keyboard. For this reason, operating systems like Android and Chrome OS will likely never support Synergy directly.

However, by employing the use of a programmable HID (such as a Raspberry Pi Zero W), Synergy can be used on pretty much any device that supports USB devices.

Raspberry Pi Zero W Setup

To setup the Raspberry Pi Zero W to act as a USB device, follow the guide found at https://www.aidanwoods.com/blog/building-a-wifi-enabled-usb-rubber-ducky/, with its corresponding repo. In particular, this issue contains a necessary workaround.

HID Synergy requires three USB devices, a mouse, a keyboard, and a digitzer (for absolute mouse functionality), so use this hid.sh instead of the one from the tutorial.

Ensure that the Raspberry Pi Zero W is being picked up as a USB device by running hid-gadget-test.c with the mouse and keyboard.

Usage

After compiling Synergy on the Raspberry Pi Zero W, there is a single new option for use with the client:

[--hid <mouse> <keyboard> <digitizer> <width> height>]

The mouse, keyboard and digitzer arguments correspond to the HID file path for each. For the hid.sh above, these should be /dev/hidg0, /dev/hidg1 and /dev/hidg2 in order.

The width and height arguments describe the width and height of the desired client screen. Modifying these values while maintaining the same aspect ratio will change how quickly the mouse will move on the client device.

Known Issues/Limitations

  • The digitizer precision is currently limited to a resolution of 255 * 255, and the bottom and right edges of the screen are unreachable
  • The mouse wheel functionality isn't implemented yet
  • The clipboard is not shared with the client device. This could potentially be done with a companion app, or in a limited auto-type fashion for just text.

About

Fork of Synergy that allows for support of Chrome OS/Android using an HID

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 86.9%
  • Shell 6.5%
  • Python 3.1%
  • Makefile 1.5%
  • CMake 0.6%
  • Objective-C++ 0.6%
  • Other 0.8%