# Key

`Key`(window) Keyname Context Modifiers Function

Binds a keyboard key to a specified fvwm command, or removes the binding if Function is '-'. The syntax is the same as for a binding except that the mouse button number is replaced with a Keyname. Normally, the key binding is activated when the key is pressed. Keyname is a standard X11 key name as defined in `/usr/include/X11/keysymdef.h`, (without the XK_ prefix), or the keysym database `/usr/X11R6/lib/X11/XKeysymDB`. Only key names that are generated with no modifier keys or with just the Shift key held are guaranteed to work. The Context and Modifiers fields are defined as in the binding. However, when you press a key the context window is the window that has the keyboard focus. That is not necessarily the same as the window the pointer is over (with or ). Note that key bindings with the '' (root window) context do not work properly with and . If you encounter problems, use the command instead. If you want to bind keys to a window with or that are supposed to work when the pointer is not over the window, fvwm assumes the pointer is over the client window (i.e. you have to use the 'W' context).

The special context '' for menus can be used to (re)define the menu controls. It be used alone or together with 'T', 'S', 'I', '[', ']', '-' and '_'. See the section for details.

The following example binds the built-in window list to pop up when Alt-Ctrl-Shift-F11 is hit, no matter where the mouse pointer is:

    Key F11 A SCM

Binding a key to a title-bar button causes that button to appear. Please refer to the command for details.