GithubHelp home page GithubHelp logo

geo-stark / virtualkeyboard-mqtt Goto Github PK

View Code? Open in Web Editor NEW
1.0 0.0 2.0 9 KB

MQTT client that emulate keyboard events using linux uinput module

Makefile 4.45% Go 65.27% C 30.28%
keyboard-emulation mqtt iot linux

virtualkeyboard-mqtt's Introduction

Description:

This is MQTT client that emulates keyboard events using linux uinput module (/dev/uinput). It doesn't depend on X11 or user sessions and may be run as a system daemon Default topic is virtualkeyboard/emit. Payload is a list of keys separated by comma. All keys in the list will be pressed then released along. Supported keys listed at the top of keyboard.go. Other keys can be added from <linux/input-event-codes.h>. To get the code of necessary key run

sudo showkey

Dependencies:

go get github.com/eclipse/paho.mqtt.golang go get github.com/pborman/getopt/v2 go get github.com/rs/xid

Build:

make
sudo make install

Usage:

run manually:

sudo virtualkeyboard-mqtt --url tcp://broker-host:port

run as root is needed to access /dev/uinput udev rules file provided to automatically change permission of /dev/uinput; put .rules file into /etc/udev/rules.d

run as systemd service:

sudo systemctl enable virtualkeyboard-mqtt
sudo systemctl start virtualkeyboard-mqtt

Test:

mosquitto_pub -h 127.0.0.1 -t virtualkeyboard/emit -m 'ctrl,alt,del'
mosquitto_pub -h 127.0.0.1 -t virtualkeyboard/emit -m 'f1'

License:

MIT

virtualkeyboard-mqtt's People

Contributors

geo-stark avatar

Stargazers

 avatar

Forkers

newimagery arfoll

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.