1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "../docbook-xml/docbookx.dtd"
5 <!ENTITY % myents SYSTEM "../fvwm.ent" >
9 <!-- $Id: Key.xml,v 1.3 2007/06/16 12:38:46 griph Exp $ -->
17 >(<replaceable>window</replaceable
20 ><replaceable>Keyname</replaceable
23 ><replaceable>Context</replaceable
26 ><replaceable>Modifiers</replaceable
29 ><replaceable>Function</replaceable
33 <para>Binds a keyboard key to a specified fvwm command, or
34 removes the binding if
35 <replaceable>Function</replaceable>
36 is '-'. The syntax is the same as for a
37 <fvwmref cmd="Mouse"/>
38 binding except that the mouse button number is replaced with a
39 <replaceable>Keyname</replaceable>.
40 Normally, the key binding is activated when the key is pressed.
41 <replaceable>Keyname</replaceable>
42 is a standard X11 key name as defined in
43 <filename>/usr/include/X11/keysymdef.h</filename>,
45 <emphasis remap='I'>XK_</emphasis>
46 prefix), or the keysym database
47 <filename>/usr/X11R6/lib/X11/XKeysymDB</filename>.
48 Only key names that are
49 generated with no modifier keys or with just the
50 <keysym>Shift</keysym>
51 key held are guaranteed to work. The
52 <replaceable>Context</replaceable> and <replaceable>Modifiers</replaceable>
53 fields are defined as in the
54 <fvwmref cmd="Mouse"/>
55 binding. However, when you press a key the context window is the
56 window that has the keyboard focus. That is not necessarily the
57 same as the window the pointer is over (with
58 <fvwmref cmd="Style" opt="SloppyFocus"/> or
59 <fvwmref cmd="Style" opt="ClickToFocus"/>).
60 Note that key bindings with the '<fvwmopt cmd="Key" opt="R"/>' (root window) context do not
62 <fvwmref cmd="Style" opt="SloppyFocus"/> and
63 <fvwmref cmd="Style" opt="ClickToFocus"/>.
64 If you encounter problems, use the
65 <fvwmref cmd="PointerKey"/>
66 command instead. If you want to bind keys to a window with
67 <fvwmref cmd="Style" opt="SloppyFocus"/> or
68 <fvwmref cmd="Style" opt="ClickToFocus"/>
69 that are supposed to work when the pointer is not over the window,
70 fvwm assumes the pointer is over the client window (i.e. you have
71 to use the 'W' context).</para>
73 <para>The special context '<fvwmopt cmd="Key" opt="M"/>' for menus can be used to (re)define the menu
74 controls. It be used alone or together with 'T', 'S', 'I', '[', ']', '-' and '_'. See the <fvwmref sect="menus" opt="menu_bindings" name="Menu Bindings"/>
75 section for details.</para>
77 <para>The following example binds the built-in window list to pop up
79 <keysym>Alt-Ctrl-Shift-F11</keysym>
80 is hit, no matter where the mouse pointer is:</para>
83 Key F11 A SCM <fvwmref cmd="WindowList"/>
86 <para>Binding a key to a title-bar button causes that button to appear.
88 <fvwmref cmd="Mouse"/>
89 command for details.</para>