File: Key.xml

package info (click to toggle)
fvwm 1%3A2.5.30.ds-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 17,960 kB
  • ctags: 15,640
  • sloc: ansic: 165,504; xml: 17,516; perl: 11,498; sh: 5,243; makefile: 1,345; yacc: 688; lex: 188; sed: 11
file content (91 lines) | stat: -rw-r--r-- 3,065 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
  "../docbook-xml/docbookx.dtd"
[
<!ENTITY % myents SYSTEM "../fvwm.ent" >
%myents;
]>

<!-- $Id: Key.xml,v 1.3 2007/06/16 12:38:46 griph Exp $ -->

<section id='Key'>
<title>Key</title>

<cmdsynopsis>
	<command>Key</command
	><arg choice='opt'
		>(<replaceable>window</replaceable
	>)</arg>
	<arg choice='plain'
		><replaceable>Keyname</replaceable
	></arg>
	<arg choice='plain'
		><replaceable>Context</replaceable
	></arg>
	<arg choice='plain'
		><replaceable>Modifiers</replaceable
	></arg>
	<arg choice='plain'
		><replaceable>Function</replaceable
	></arg>
</cmdsynopsis>

<para>Binds a keyboard key to a specified fvwm command, or
removes the binding if
<replaceable>Function</replaceable>
is '-'.  The syntax is the same as for a
<fvwmref cmd="Mouse"/>
binding except that the mouse button number is replaced with a
<replaceable>Keyname</replaceable>.
Normally, the key binding is activated when the key is pressed.
<replaceable>Keyname</replaceable>
is a standard X11 key name as defined in
<filename>/usr/include/X11/keysymdef.h</filename>,
(without the
<emphasis remap='I'>XK_</emphasis>
prefix), or the keysym database
<filename>/usr/X11R6/lib/X11/XKeysymDB</filename>.
Only key names that are
generated with no modifier keys or with just the
<keysym>Shift</keysym>
key held are guaranteed to work.  The
<replaceable>Context</replaceable> and <replaceable>Modifiers</replaceable>
fields are defined as in the
<fvwmref cmd="Mouse"/>
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
<fvwmref cmd="Style" opt="SloppyFocus"/> or
<fvwmref cmd="Style" opt="ClickToFocus"/>).
Note that key bindings with the '<fvwmopt cmd="Key" opt="R"/>' (root window) context do not
work properly with
<fvwmref cmd="Style" opt="SloppyFocus"/> and
<fvwmref cmd="Style" opt="ClickToFocus"/>.
If you encounter problems, use the
<fvwmref cmd="PointerKey"/>
command instead.  If you want to bind keys to a window with
<fvwmref cmd="Style" opt="SloppyFocus"/> or
<fvwmref cmd="Style" opt="ClickToFocus"/>
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).</para>

<para>The special context '<fvwmopt cmd="Key" opt="M"/>' for menus can be used to (re)define the menu
controls. It be used alone or together with 'T', 'S', 'I', '[', ']', '-' and '_'.  See the <fvwmref sect="menus" opt="menu_bindings" name="Menu Bindings"/>
section for details.</para>

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

<programlisting>
Key F11 A SCM <fvwmref cmd="WindowList"/>
</programlisting>

<para>Binding a key to a title-bar button causes that button to appear.
Please refer to the
<fvwmref cmd="Mouse"/>
command for details.</para>

</section>