FunKeys: daemon and patches

The FunKeys driver is an add-on to the standard Linux keyboard driver that opens up access to those "funny" or "functional" keys you see on some keyboards. (Eg. "Power Off", or "Email" on so-called "Internet keyboards.) Rick van Rein wrote the kernel patch and original daemon.

The idea behind FunKeys is that instead of associating a keycode with a string to send to the console driver, you associate certain keycodes with shell commands. Thus, you could assign that "Power Off" key to a custom keycode, and then associate that keycode with a command to shut your system down.

Alternate FunKeys daemon

I've rewritten Rick's daemon in a more general fashion: instead of having the commands to execute hard-coded in the daemon, my version reads a config file. Also, I've added code so the daemon can actually run as a daemon and added some rudimentary debugging output.

The daemon is in funkeyd.c, which contains all the documentation. Share and enjoy!

Updated kernel patch

I discovered that Rick's funkey driver doesn't handle non-blocking reads or the select() call. I'll put revised versions of Rick's kernel patch here for the time being.