12.12. Extra Keys / Hot Keys

12.12.1. Related Documentation

  1. Keyboard-and-Console-HOWTO

12.12.2. Utilities

Some laptops offer extra buttons, e.g. - internet, mail keys, or zone keys. If the Linux kernel and XFree86/X.org generate key codes for them, hotkeys or just plain xmodmap (see the man page of this X11 programm for details) may be helpful. If Linux doesn't know about the keys, you'll have to patch the kernel first. Though I'm not quite sure some tools don't seem to require this, I don't understand how it works yet. You may also use xhkeys . This tool allows you to assign an action to any key that is otherwise unused in X (such as the "menu" key on a 105 key keyboard, extra keys on some keyboard models, or odd keys on laptops). The action assigned to a key or key combination (key and modifiers) can be a builtin operation, a call to an external application, the sending of a key event (simulating a key press/release), or the sending of a mouse button event (simulating a button press/release).

Tip

To get information about unknown keyboard or mouse events you may use showkey and mev (the last one is from the gpm package) on a console screen. But some of the extra keys are not found with these tools.

keyTouch makes it possible to easily configure the extra function keys of a keyboard (like multimedia keys). It allows the user to define which program will be executed when a key is pressed. By using keyTouch-editor the user can easily create a keyboard file for his or her laptop to get the laptop supported.

akdaemon is a userland daemon to invoke "the fun keys" by accessing a dev node offered by the complementary kernel patch or the funkey programm .

The hotkeys package is supposed to listen for those multimedia keys.

Special ("easy access") buttons are supported by LinEAK . Here is an example lineakd.conf file:

# LinEAK Configuration file for Compaq Easy Access Key 2800 (6 keys)

# Global settings
KeyboardType            = CIKP800
CdromDevice             = /dev/cdrom
MixerDevice             = /dev/mixer

# Specific keys of your keyboard
internet        = xosview
search          = kfind
mail            = kmail
multimedia      = "artsdsp xmms"
voldown         = "aumix -v -2"
volup           = "aumix -v +2"

# end lineakd.conf

xbindkeys is a program that associates keys or mouse buttons to shell commands under X. After a little configuration, it can start many commands with the keyboard (e.g. control+alt+x starts an xterm) or with the mouse buttons.

ACME is a small GNOME tool to make use of the multimedia buttons present on most laptops and Internet keyboards: Volume, Brightness, Power, Eject, My Home, Search, E-Mail, Sleep, Screensaver, Finance, WWW, Calculator, Record, Close Window, Shade Window, Play, Stop, Pause, Previous, Next, Groups, Media, Refresh, and Help buttons. It works on all the platforms GNOME supports (laptops and PCs). It uses either OSS or ALSA for Volume control.

For some laptop series there are Linux utilities available to control special hotkeys and other features.