Linux – Remapping keys on keyboard in Linux

keyboardlinux

I am currently using xmodmap for remapping keys like Caps Lock on my keyboard.

However, my keyboard has a bunch of keys on the top that are rarely used (Multimedia keyboard with buttons like Internet, Music, Next song, Mute etc)

I want to remap these keys to specific commands (Not keys).

For example: Pressing the Internet button should fire up my Firefox (/usr/bin/firefox)(which happens only in Windows for me)
Also I need to map a specific button to xkill.

Is there a way to achieve this?
Using: Fedora 14 on GNOME and KDE (both)

Best Answer

Try xbindkeys. It allows you to bind... er, more esoteric keys to arbitrary commands. As an example, on my laptop, I bound a script to toggle dual-monitor support to Fn-5 (IIRC--I no longer use this binding) using the following command:

(xbindkey '("m:0x0" "c:235") "$HOME/usr/bin/dual-monitor-setup")

I'm using its GUILE support for my config, though, so you'll probably have to modify it, if you want to use the simpler config format. Its documentation is rather good, so you shouldn't have much trouble figuring out how to make it do what you want to.

Related Question