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”
EndSection

To catch the key presses and run specific programs upon specific key codes I used:
http://www.bedroomlan.org/~alexios/coding_evrouter.html

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

~/.evrouterrc:

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)

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: