Debian Codegraph @

upstream/opensuse-tumbleweed/man5/icewm-keys.5

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man v6.0.2 (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 .\" Required to disable full justification in groff 1.23.0.
57 .if n .ds AD l
58 .\" ========================================================================
59 .\"
60 .IX Title "ICEWM-KEYS 5"
61 .TH ICEWM-KEYS 5 2025-08-31 "icewm 3.9.0" "Standards, Environments and Macros"
62 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
63 .\" way too many mistakes in technical documents.
64 .if n .ad l
65 .nh
66 .SS NAME
67 .IX Subsection "NAME"
68 .Vb 1
69 \& icewm\-keys \- icewm keys configuration file
70 .Ve
71 .SS SYNOPSIS
72 .IX Subsection "SYNOPSIS"
73 .Vb 5
74 \& $ICEWM_PRIVCFG/keys
75 \& $XDG_CONFIG_HOME/icewm/keys
76 \& $HOME/.icewm/keys
77 \& /etc/icewm/keys
78 \& /usr/share/icewm/keys
79 .Ve
80 .SS DESCRIPTION
81 .IX Subsection "DESCRIPTION"
82 The \f(CW\*(C`keys\*(C'\fR file defines global keybindings to launch applications.
83 A keybinding has three parts: the word \fBkey\fR, a double\-quoted string
84 with an X11 key combination and a program with its arguments.
85 These are separated by one or more spaces. Empty lines are allowed.
86 Comment lines start with a hash.
87 .PP
88 For example, the following defines a hotkey to restart \fBicewm\fR:
89 .PP
90 .Vb 1
91 \& key "Ctrl+Shift+r" icesh restart
92 .Ve
93 .PP
94 See the output of \f(CW\*(C`xmodmap \-pk\*(C'\fR for a list of the many keystroke names
95 you can use in icewm key definitions. Since IceWM version 3.4.0,
96 bindings can not only be defined by their keystroke name, but also by
97 their key label. In addition, the shifted key is now definable as well.
98 For example, the key with + and = can be bound in either of the
99 following four ways, which are identical:
100 .PP
101 .Vb 4
102 \& key "Ctrl+Shift+equal" xterm
103 \& key "Ctrl+Shift+=" xterm
104 \& key "Ctrl+plus" xterm
105 \& key "Ctrl++" xterm
106 .Ve
107 .PP
108 To bind the mouse, use \f(CW\*(C`Pointer_Button1\*(C'\fR for button 1, and so on.
109 This only works when the mouse is over the root window.
110 See below for examples.
111 .PP
112 Sometimes you may want to start an application just once. For this, use
113 the \f(CW\*(C`runonce\*(C'\fR keyword, which accepts an additional resource argument.
114 .PP
115 The command \f(CW\*(C`icesh keys\*(C'\fR instructs icewm to reload this file.
116 .SS FORMAT
117 .IX Subsection "FORMAT"
118 The syntax of the \fIkeys\fR file is as follows:
119 .RS 4
120 .IP "\fBkey\fR \fB""\fR\fIkey_combination\fR\fB""\fR \fIprogram\fR \fIoptions\fR" 4
121 .IX Item "key ""key_combination"" program options"
122 .RE
123 .RS 4
124 .RE
125 .PP
126 Where,
127 .IP \fBkey\fR 4
128 .IX Item "key"
129 The word \fBkey\fR begins the definition of a keybinding.
130 .IP \fIkey_combination\fR 4
131 .IX Item "key_combination"
132 A combination of modifiers and a key, like \f(CW\*(C`Ctrl+Alt+Delete\*(C'\fR.
133 Valid modifiers are Alt, AltGr, Ctrl, Hyper, Meta, Shift, Super.
134 Each modifier must be followed by a single plus\-sign.
135 The key is either a keystroke name or a key label.
136 Instead of a key, mouse pointer buttons can be specified by
137 \&\f(CW\*(C`Pointer_Button1\*(C'\fR and up, like \f(CW\*(C`Shift+Pointer_Button3\*(C'\fR.
138 .IP "\fIprogram\fR \fIoptions\fR" 4
139 .IX Item "program options"
140 \&\fIprogram\fR is the name of the executable or its path.
141 It may start with a tilde or an environment variable,
142 which will be expanded.
143 The \fIoptions\fR are passed as arguments to the \fIprogram\fR.
144 .IP \fBrunonce\fR 4
145 .IX Item "runonce"
146 Is an alternative to \fBkey\fR. Its syntax is:
147 .RS 4
148 .RS 4
149 .IP "\fBrunonce\fR \fB""\fR\fIhotkey\fR\fB""\fR \fB""\fR\fIwmclass\fR\fB""\fR \fIprogram\fR \fIoptions\fR" 4
150 .IX Item "runonce ""hotkey"" ""wmclass"" program options"
151 .RE
152 .RS 4
153 .RE
154 .RE
155 .RS 4
156 .Sp
157 Here \fIwmclass\fR is the resource name and/or class. The class must be
158 prefixed by a dot. The program is only run when no other application
159 window with the same \fIwmclass\fR exists. Icewm ignores key repeat events
160 for this hotkey.
161 .RE
162 .IP \fBswitchkey\fR 4
163 .IX Item "switchkey"
164 Is an alternative to \fBkey\fR. In this case the \fIprogram\fR must print on
165 standard output the definition of a dynamic \fBicewm\-menu\fR\|(1).
166 This menu will presented as a popup menu.
167 .SS EXAMPLES
168 .IX Subsection "EXAMPLES"
169 Following is the example \fIkeys\fR file that ships with \fBicewm\fR\|(1):
170 .PP
171 .Vb 10
172 \& # This is an example for IceWM\*(Aqs hotkey definition file.
173 \& #
174 \& # A list of all valid keyboard symbols can be found in
175 \& # /usr/include/X11/keysymdef.h, XF86keysym.h, ...
176 \& # Omit the XK_ prefixs and replace XF86XK_ prefixes by XF86.
177 \& # Valid modifiers are Alt, AltGr, Ctrl, Shift, Meta, Super, Hyper.
178 \& #
179 \& key "Alt+Ctrl+t" xterm
180 \& key "Alt+Ctrl+b" xdg\-open about:blank
181 \& key "Alt+Ctrl+s" xdg\-open https://www.google.com
182 \&
183 \& key "Super+KP_Subtract" amixer sset PCM 5%\-
184 \& key "Super+KP_Add" amixer sset PCM 5%+
185 \&
186 \& # "Multimedia key" bindings for XFree86. Gather the
187 \& # keycodes of your advanced function keys by watching the
188 \& # output of the xev command whilst pressing those keys
189 \& # and map those symbols using xmodmap.
190 \&
191 \& key "XF86AudioLowerVolume" amixer sset PCM 5%\-
192 \& key "XF86AudioRaiseVolume" amixer sset PCM 5%+
193 \& key "XF86AudioMute" amixer sset PCM 0%
194 \& key "XF86HomePage" xdg\-open about:blank
195 \& key "XF86Search" xdg\-open https://www.google.com
196 \& key "XF86Eject" eject
197 \&
198 \& # display and select monitor setup configurations
199 \& switchkey "Super+p" icewm\-menu\-xrandr
200 \&
201 \& # display and select from all terminals
202 \& switchkey "Super+q" icesh \-Z switchmenu
203 .Ve
204 .PP
205 Following shows how to add mouse button bindings on the root window to
206 change the current workspace rolling the mouse wheel on the desktop:
207 .PP
208 .Vb 2
209 \& key "Pointer_Button4" icesh goto prev
210 \& key "Pointer_Button5" icesh goto next
211 .Ve
212 .PP
213 These are key bindings for single window tile operations to replace the
214 \&\fIKeyWinArrange\fR key bindings from the \fIpreferences\fR file:
215 .PP
216 .Vb 9
217 \& key "Ctrl+Alt+KP_Home" icesh \-f sizeto 49% 49% top left
218 \& key "Ctrl+Alt+KP_Up" icesh \-f sizeto 100% 49% top left
219 \& key "Ctrl+Alt+KP_Prior" icesh \-f sizeto 49% 49% top right
220 \& key "Ctrl+Alt+KP_Right" icesh \-f sizeto 49% 100% top right
221 \& key "Ctrl+Alt+KP_Next" icesh \-f sizeto 49% 49% bottom right
222 \& key "Ctrl+Alt+KP_Down" icesh \-f sizeto 100% 49% bottom left
223 \& key "Ctrl+Alt+KP_End" icesh \-f sizeto 49% 49% bottom left
224 \& key "Ctrl+Alt+KP_Left" icesh \-f sizeto 49% 100% top left
225 \& key "Ctrl+Alt+KP_Begin" icesh \-f sizeto 49% 49% center
226 .Ve
227 .SS FILES
228 .IX Subsection "FILES"
229 Locations for the \fIkeys\fR file are as follows:
230 .PP
231 .Vb 5
232 \& $ICEWM_PRIVCFG/keys
233 \& $XDG_CONFIG_HOME/icewm/keys
234 \& $HOME/.icewm/keys
235 \& /etc/icewm/keys
236 \& /usr/share/icewm/keys
237 .Ve
238 .PP
239 The locations are searched in the order listed; the first file found is
240 read and the remainder ignored.
241 .SS "SEE ALSO"
242 .IX Subsection "SEE ALSO"
243 \&\fBicewm\fR\|(1).
244 .SS AUTHOR
245 .IX Subsection "AUTHOR"
246 Brian Bidulock <mailto:[email protected]>.
247 .SS LICENSE
248 .IX Subsection "LICENSE"
249 \&\fBIceWM\fR is licensed under the GNU Library General Public License.
250 See the \fICOPYING\fR file in the distribution.