Skip to content

anuragpeshne/vKeyboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vKeyboard

Share keyboard across computers

Motivation:

I wrote this program to feed input to my Raspberry Pi using my laptop's keyboard over LAN. However, it can be used to provide input to any Linux device using keyboard connected to any Linux device over any network.

Caveat:
  • This program is intended to be used on a trusted network. Keyboard keys are transported over plain TCP sockets and thus can be messed up with.
  • Further, the program relies on /dev/input/by-path/{kbd-device} to read keyboard keys and /dev/uinput (user level input subsystem) to emulate keyboard events. Make sure they exist on your devices.
How To:
  1. Clone.
  2. On Remote (where keyboard input needs to be provided):
  3. cd into /remote
  4. gcc *.c
  5. sudo ./a.out &
  6. ctrl-c to stop.
  7. On Host (where Keyboard is connected):
  8. cd into /host.
  9. gcc *.c
  10. sudo ./a.out {IP address of remote} {/dev/input/by-path/name of keyboard file}
  11. optional: preceed above command by stty -echo to prevent terminal from echoing back; execute stty echo to return to original behavior.
  12. ctrl-c to stop.
To-Do:
  • Make key combinations to enable and disable sending key codes.
  • Ignore sigint on host, or have a way around.
  • Try to make it work on Android. (Android has /dev/uinput).
  • Write keyboard reader for OS X.
  • Share mouse similarly (?).

About

Share keyboard across computers over the network

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages