|linux keys intercepting daemon|
keysid - keys intercepting daemon
- Contact me
keysid is a highly configurable linux daemon which lets you intercept
keyboard key strokes and make them execute the programs you want.
It's thought for laptop and multimedia keyboards, which usually have
more keys than standard keyboards, but it works with all the keys.
In order to compile and install from the source package you can simply
with the --prefix you want.
It will put programs in /usr/sbin and the init script in /etc/init.d/ .
If you are new to keysid PLEASE READ THE NEXT SECTION BEFORE RUNNING THE
Now that `keysid' is installed you must run it's configuration program
(keyscfg) before running the daemon. This is the usage:
keyscfg <-n keynumber> [-f config_file] [-d device]
`-n' is required, it stands for the number of keys you want to intercept
`-f' is the path to the output configuration file, default is
`-d' is the device you want to read from. The default is
`/dev/input/event0', you shouldn't use this option unless you know
what you are doing.
Run `keyscfg', _don't press any key_ until it's beginning message, then you
will asked for pressing as much keys as you requested (`-n' option).
If these steps go right you'll find the configuration file in
/etc/keysid/keysid.conf (unless you gave the `-f' option).
Well, now you have to edit the configuration file. The first line
is the device the program reads from, you shouldn't edit this line since
the configuration file depends on the input device.
The second line is the program executed on timeout. The first field is
the number of seconds the daemon waits to before it executes the
command, if you set it to 0 the program won't be executed.
300 crowolo openvt -s -w -- vlock -a
Read below for the syntax of the `user' and `command' fields.
The other lines (no `#' comments, no white lines) are in the form:
key user command
The key field shouldn't be edited. The user field stands for the user who
executes the command (the next field). The command is read to the end of
the line, it may contains spaces. The command will be executed as `su -
user -c "command" ', therefore.. be careful about escaping!
0xcc crowolo mpg123 ~/songs/*.mp3
0xcc -> the key
crowolo -> the user
mpg123 ~/songs/*.mp3 -> the command
This line will be executed as `su - crowolo -c "mpg123 ~/songs/*.mp3" '.
Now you can start the daemon (keysid). You can also specify the
configuration file the daemon will read by passing it as
The debian package provides the init script which can be used to run the
daemon at boot time. If you want to run it by init script and make the
daemon read from a non-default file, you must edit /etc/default/keysid .
You shouldn't press any key for a couple of milliseconds after you start
both the daemon and the configurator program, otherwise the program
couldn't get your input in the right way.
For questions, bug reports and so on please send a mail to <scrows at