[mythtv-users] New Microsoft Media Keyboard

Paul Andreassen paulx at andreassen.com.au
Thu Jul 14 08:13:39 EDT 2005

On Thu, 14 Jul 2005 04:32 am, jack wrote:
> Anybody know how to remap keys on a linux usb keyboard? Not sure where to
> start, the top has keys for shut down and sleep which basically just crash
> my machine. I would like to disable or remap them, any pointers for where
> to start?

Go to a terminal (Ctrl-Atl-F1) and execute 'showkey'.  This gives you the key 
codes for the keys you press.  (Also good for cleaning your keyboard as 
suggested in the man page.)  You can then set these key codes to character 
codes with 'setkeycodes' in your local startup script 'rc.local'.

Also have a look at xmodmap.  You may not need to use it but you should know 
its there.

As a last resort and even then probably not a good idea, you can use this 
program I wrote to binary patch your kernel to change how usb hid keyboard 
codes are translated into key codes.

More then you ever wanted to know,

More information about the mythtv-users mailing list