Debian Codegraph @

upstream/debian-trixie/man5/icewm-keys.5

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\" ========================================================================
56 .\"
57 .IX Title "ICEWM-KEYS 5"
58 .TH ICEWM-KEYS 5 2025-05-03 "icewm\ 3.7.4" "Standards, Environments and Macros"
59 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
60 .\" way too many mistakes in technical documents.
61 .if n .ad l
62 .nh
63 .SS NAME
64 .IX Subsection "NAME"
65 .Vb 1
66 \& icewm\-keys \- icewm keys configuration file
67 .Ve
68 .SS SYNOPSIS
69 .IX Subsection "SYNOPSIS"
70 .Vb 5
71 \& $ICEWM_PRIVCFG/keys
72 \& $XDG_CONFIG_HOME/icewm/keys
73 \& $HOME/.icewm/keys
74 \& /etc/X11/icewm/keys
75 \& /usr/share/icewm/keys
76 .Ve
77 .SS DESCRIPTION
78 .IX Subsection "DESCRIPTION"
79 The \f(CW\*(C`keys\*(C'\fR file defines global keybindings to launch applications.
80 A keybinding has three parts: the word \fBkey\fR, a double-quoted string
81 with an X11 key combination and a program with its arguments.
82 These are separated by one or more spaces. Empty lines are allowed.
83 Comment lines start with a hash.
84 .PP
85 For example, the following defines a hotkey to restart \fBicewm\fR:
86 .PP
87 .Vb 1
88 \& key "Ctrl+Shift+r" icesh restart
89 .Ve
90 .PP
91 See the output of \f(CW\*(C`xmodmap \-pk\*(C'\fR for a list of the many keystroke names
92 you can use in icewm key definitions. Since IceWM version 3.4.0,
93 bindings can not only be defined by their keystroke name, but also by
94 their key label. In addition, the shifted key is now definable as well.
95 For example, the key with + and = can be bound in either of the
96 following four ways, which are identical:
97 .PP
98 .Vb 4
99 \& key "Ctrl+Shift+equal" xterm
100 \& key "Ctrl+Shift+=" xterm
101 \& key "Ctrl+plus" xterm
102 \& key "Ctrl++" xterm
103 .Ve
104 .PP
105 To bind the mouse, use \f(CW\*(C`Pointer_Button1\*(C'\fR for button 1, and so on.
106 This only works when the mouse is over the root window.
107 See below for examples.
108 .PP
109 The command \f(CW\*(C`icesh keys\*(C'\fR instructs icewm to reload this file.
110 .SS FORMAT
111 .IX Subsection "FORMAT"
112 The syntax of the \fIkeys\fR file is as follows:
113 .RS 4
114 .IP "\fBkey\fR \fB""\fR\fIkey_combination\fR\fB""\fR \fIprogram\fR \fIoptions\fR" 4
115 .IX Item "key ""key_combination"" program options"
116 .RE
117 .RS 4
118 .RE
119 .PP
120 Where,
121 .IP \fBkey\fR 4
122 .IX Item "key"
123 The word \fBkey\fR begins the definition of a keybinding.
124 .IP \fIkey_combination\fR 4
125 .IX Item "key_combination"
126 A combination of modifiers and a key, like \f(CW\*(C`Ctrl+Alt+Delete\*(C'\fR.
127 Valid modifiers are Alt, AltGr, Ctrl, Hyper, Meta, Shift, Super.
128 Each modifier must be followed by a single plus-sign.
129 The key is either a keystroke name or a key label.
130 Instead of a key, mouse pointer buttons can be specified by
131 \&\f(CW\*(C`Pointer_Button1\*(C'\fR and up, like \f(CW\*(C`Shift+Pointer_Button3\*(C'\fR.
132 .IP "\fIprogram\fR \fIoptions\fR" 4
133 .IX Item "program options"
134 \&\fIprogram\fR is the name of the executable or its path.
135 It may start with a tilde or an environment variable,
136 which will be expanded.
137 The \fIoptions\fR are passed as arguments to the \fIprogram\fR.
138 .IP \fBswitchkey\fR 4
139 .IX Item "switchkey"
140 Is an alternative to \fBkey\fR. In this case the \fIprogram\fR must print on
141 standard output the definition of a dynamic \fBicewm\-menu\fR\|(1).
142 This menu will presented as a popup menu.
143 .SS EXAMPLES
144 .IX Subsection "EXAMPLES"
145 Following is the example \fIkeys\fR file that ships with \fBicewm\fR\|(1):
146 .PP
147 .Vb 10
148 \& # This is an example for IceWM\*(Aqs hotkey definition file.
149 \& #
150 \& # A list of all valid keyboard symbols can be found in
151 \& # /usr/include/X11/keysymdef.h, XF86keysym.h, ...
152 \& # Omit the XK_ prefixs and replace XF86XK_ prefixes by XF86.
153 \& # Valid modifiers are Alt, AltGr, Ctrl, Shift, Meta, Super, Hyper.
154 \& #
155 \& key "Alt+Ctrl+t" xterm
156 \& key "Alt+Ctrl+b" xdg\-open about:blank
157 \& key "Alt+Ctrl+s" xdg\-open https://www.google.com
158 \&
159 \& key "Super+KP_Subtract" amixer sset PCM 5%\-
160 \& key "Super+KP_Add" amixer sset PCM 5%+
161 \&
162 \& # "Multimedia key" bindings for XFree86. Gather the
163 \& # keycodes of your advanced function keys by watching the
164 \& # output of the xev command whilst pressing those keys
165 \& # and map those symbols using xmodmap.
166 \&
167 \& key "XF86AudioLowerVolume" amixer sset PCM 5%\-
168 \& key "XF86AudioRaiseVolume" amixer sset PCM 5%+
169 \& key "XF86AudioMute" amixer sset PCM 0%
170 \& key "XF86HomePage" xdg\-open about:blank
171 \& key "XF86Search" xdg\-open https://www.google.com
172 \& key "XF86Eject" eject
173 \&
174 \& # display and select monitor setup configurations
175 \& switchkey "Super+p" icewm\-menu\-xrandr
176 .Ve
177 .PP
178 Following shows how to add mouse button bindings on the root window to
179 change the current workspace rolling the mouse wheel on the desktop:
180 .PP
181 .Vb 2
182 \& key "Pointer_Button4" icesh goto prev
183 \& key "Pointer_Button5" icesh goto next
184 .Ve
185 .PP
186 These are key bindings for single window tile operations to replace the
187 \&\fIKeyWinArrange\fR key bindings from the \fIpreferences\fR file:
188 .PP
189 .Vb 9
190 \& key "Ctrl+Alt+KP_Home" icesh \-f sizeto 49% 49% top left
191 \& key "Ctrl+Alt+KP_Up" icesh \-f sizeto 100% 49% top left
192 \& key "Ctrl+Alt+KP_Prior" icesh \-f sizeto 49% 49% top right
193 \& key "Ctrl+Alt+KP_Right" icesh \-f sizeto 49% 100% top right
194 \& key "Ctrl+Alt+KP_Next" icesh \-f sizeto 49% 49% bottom right
195 \& key "Ctrl+Alt+KP_Down" icesh \-f sizeto 100% 49% bottom left
196 \& key "Ctrl+Alt+KP_End" icesh \-f sizeto 49% 49% bottom left
197 \& key "Ctrl+Alt+KP_Left" icesh \-f sizeto 49% 100% top left
198 \& key "Ctrl+Alt+KP_Begin" icesh \-f sizeto 49% 49% center
199 .Ve
200 .SS FILES
201 .IX Subsection "FILES"
202 Locations for the \fIkeys\fR file are as follows:
203 .PP
204 .Vb 5
205 \& $ICEWM_PRIVCFG/keys
206 \& $XDG_CONFIG_HOME/icewm/keys
207 \& $HOME/.icewm/keys
208 \& /etc/X11/icewm/keys
209 \& /usr/share/icewm/keys
210 .Ve
211 .PP
212 The locations are searched in the order listed; the first file found is
213 read and the remainder ignored.
214 .SS "SEE ALSO"
215 .IX Subsection "SEE ALSO"
216 \&\fBicewm\fR\|(1).
217 .SS AUTHOR
218 .IX Subsection "AUTHOR"
219 Brian Bidulock <mailto:[email protected]>.
220 .SS LICENSE
221 .IX Subsection "LICENSE"
222 \&\fBIceWM\fR is licensed under the GNU Library General Public License.
223 See the \fICOPYING\fR file in the distribution.