No commit activity in last 3 years
No release in over 3 years
A wrapper for the Linux utility xinput. Publishes an SPS message whenever the super key is pressed as well as publishing a deciphered message when the control key is pressed more than once
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 0.3, >= 0.3.1
~> 0.5, >= 0.5.5
~> 0.8, >= 0.8.1
~> 0.0, >= 0.0.8
 Project Readme

Using XInputWrapperPlus to trigger upon a key press and more

Example

require "socket"
require 'xinput_wrapperplus'

hostname =  Socket.gethostname
keys = %i(control super f6)

xiw = XInputWrapperPlus.new topic: hostname + '/input', 
         lookup:  {105 => :control, 37 => :control, 134 => :super}, 
         host: 'sps.home', keys: keys
xiw.listen

The above example is intended to run in the background to listen for key presses or mouse movement. When either the ctrl key, super key (windows logo key), or F6 key is pressed a message is published to the SimplePubSub broker at sps.home on port 59000. In addition, it publishes the detection of any key or mouse movent to the broker, ever 30 seconds.

xinputwrapperplus xinput