Code Monkey home page Code Monkey logo

vkeyboard's Introduction

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 (?).

vkeyboard's People

Contributors

anuragpeshne avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.