Shortcut keyboard

I have two keyboards attached to my computer now, one for the sole purpose of launching other
programs when specific keys are struck.

This is input device portion of my xorg.conf file. It is set up so my input device is that of my main keyboard. This means any other keyboards attached to the PC don’t produce characters when their keys are struck.

Section “InputDevice”
Identifier “Keyboard0”
Driver “evdev”
Option “Device” “/dev/input/event4”

To catch the key presses and run specific programs upon specific key codes I used:

Below is the config file I use which means when the ‘f’ key is pressed firefox is launched.


Window “”: # Window title
“Keyboard” “” any key/33 “Shell/firefox”

Run using:
./evrouter /dev/input/event2

(n.b. you will have to run as root unless /dev/input… is user accessible, this is obviously a bad idea, as it means any program run from it will also be root. An entry in /etc/udev/rules.d/ can be added so your user can read the device, remember this does make it easier for keyloggers to gain access to your keystrokes)


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: