View Single Post

   
  #1 (permalink)  
Old 01-18-2008, 06:21 AM
Steve Mading
 
Posts: n/a
Default How to map weird keyboard keys to arbitrary actions?

Okay, so I recently got one of those new keyboards that has all
sorts of weird proprietary extra keys on it, marked with things
on them like "e-mail" and "favorites" and so on. With the vendor-
supplied driver, these do things in Windows, but of course they
don't do anything with the generic keyboard driver for linux. I
know that in theory I can figure out what the key codes are that are
sent when I press them. The question I have is, does there exist
some sort of method in linux for watching the keyboard globally,
and reacting to certain keycodes with global actions I can define
arbitrarily?

What would be nice would be something crontab-like. "If you see
this particular keycode, then run this command. If you see that
keycode, then run that command."

something like: (These are made-up keycodes - not the real thing)

000 120 /usr/local/bin/mozilla # Web Browser button
000 121 /usr/local/bin/soffice # Office button
001 150 aumix -v + # volume-up button
001 151 aumix -v - # volume-down button

...etc..


Does such a thing exist already? I'd RTFM, but I don't know where
to FTFM on this one.

Reply With Quote