1ICEWM-KEYS(5) Standards, Environments and Macros ICEWM-KEYS(5)
2
3
4
5 NAME
6 icewm-keys - icewm keys configuration file
7
8 SYNOPSIS
9 $ICEWM_PRIVCFG/keys
10 $XDG_CONFIG_HOME/icewm/keys
11 $HOME/.icewm/keys
12 /etc/icewm/keys
13 /usr/share/icewm/keys
14
15 DESCRIPTION
16 The "keys" file defines global keybindings to launch applications. A
17 keybinding has three parts: the word key, a double-quoted string with
18 an X11 key combination and a program with its arguments. These are
19 separated by one or more spaces. Empty lines are allowed. Comment
20 lines start with a hash.
21
22 For example, the following defines a hotkey to restart icewm:
23
24 key "Ctrl+Shift+r" icesh restart
25
26 See the output of "xmodmap -pk" for a list of the many keystroke names
27 you can use in icewm key definitions. Since IceWM version 3.4.0,
28 bindings can not only be defined by their keystroke name, but also by
29 their key label. In addition, the shifted key is now definable as well.
30 For example, the key with + and = can be bound in either of the
31 following four ways, which are identical:
32
33 key "Ctrl+Shift+equal" xterm
34 key "Ctrl+Shift+=" xterm
35 key "Ctrl+plus" xterm
36 key "Ctrl++" xterm
37
38 To bind the mouse use "Pointer_Button1" for button 1, and so on. The
39 command "icesh keys" instructs icewm to reload this file.
40
41 FORMAT
42 The syntax of the keys file is as follows:
43
44 key "key_combination" program options
45
46 Where,
47
48 key The word key begins the definition of a keybinding.
49
50 key_combination
51 A combination of modifiers and a key, like "Ctrl+Alt+Delete".
52 Valid modifiers are Alt, AltGr, Ctrl, Hyper, Meta, Shift, Super.
53 Each modifier must be followed by a single plus-sign. The key is
54 either a keystroke name or a key label. Instead of a key, mouse
55 pointer buttons can be specified by "Pointer_Button1" and up, like
56 "Shift+Pointer_Button3".
57
58 program options
59 program is the name of the executable or its path. It may start
60 with a tilde or an environment variable, which will be expanded.
61 The options are passed as arguments to the program.
62
63 switchkey
64 Is an alternative to key. In this case the program must print on
65 standard output the definition of a dynamic icewm-menu(1). This
66 menu will presented as a popup menu.
67
68 EXAMPLES
69 Following is the example keys file that ships with icewm(1):
70
71 # This is an example for IceWM's hotkey definition file.
72 #
73 # A list of all valid keyboard symbols can be found in
74 # /usr/include/X11/keysymdef.h, XF86keysym.h, ...
75 # Omit the XK_ prefixs and replace XF86XK_ prefixes by XF86.
76 # Valid modifiers are Alt, AltGr, Ctrl, Shift, Meta, Super, Hyper.
77 #
78 key "Alt+Ctrl+t" xterm
79 key "Alt+Ctrl+b" xdg-open about:blank
80 key "Alt+Ctrl+s" xdg-open https://www.google.com
81
82 key "Super+KP_Subtract" amixer sset PCM 5%-
83 key "Super+KP_Add" amixer sset PCM 5%+
84
85 # "Multimedia key" bindings for XFree86. Gather the
86 # keycodes of your advanced function keys by watching the
87 # output of the xev command whilst pressing those keys
88 # and map those symbols using xmodmap.
89
90 key "XF86AudioLowerVolume" amixer sset PCM 5%-
91 key "XF86AudioRaiseVolume" amixer sset PCM 5%+
92 key "XF86AudioMute" amixer sset PCM 0%
93 key "XF86HomePage" xdg-open about:blank
94 key "XF86Search" xdg-open https://www.google.com
95 key "XF86Eject" eject
96
97 # display and select monitor setup configurations
98 switchkey "Super+p" icewm-menu-xrandr
99
100 Following shows how to add mouse button bindings on the root window to
101 change the current workspace rolling the mouse wheel on the desktop:
102
103 key "Pointer_Button4" icesh goto prev
104 key "Pointer_Button5" icesh goto next
105
106 These are key bindings for single window tile operations to replace the
107 KeyWinArrange key bindings from the preferences file:
108
109 key "Ctrl+Alt+KP_Home" icesh -f sizeto 49% 49% top left
110 key "Ctrl+Alt+KP_Up" icesh -f sizeto 100% 49% top left
111 key "Ctrl+Alt+KP_Prior" icesh -f sizeto 49% 49% top right
112 key "Ctrl+Alt+KP_Right" icesh -f sizeto 49% 100% top right
113 key "Ctrl+Alt+KP_Next" icesh -f sizeto 49% 49% bottom right
114 key "Ctrl+Alt+KP_Down" icesh -f sizeto 100% 49% bottom left
115 key "Ctrl+Alt+KP_End" icesh -f sizeto 49% 49% bottom left
116 key "Ctrl+Alt+KP_Left" icesh -f sizeto 49% 100% top left
117 key "Ctrl+Alt+KP_Begin" icesh -f sizeto 49% 49% center
118
119 FILES
120 Locations for the keys file are as follows:
121
122 $ICEWM_PRIVCFG/keys
123 $XDG_CONFIG_HOME/icewm/keys
124 $HOME/.icewm/keys
125 /etc/icewm/keys
126 /usr/share/icewm/keys
127
128 The locations are searched in the order listed; the first file found is
129 read and the remainder ignored.
130
131 SEE ALSO
132 icewm(1).
133
134 AUTHOR
135 Brian Bidulock <mailto:bidulock@openss7.org>.
136
137 LICENSE
138 IceWM is licensed under the GNU Library General Public License. See
139 the COPYING file in the distribution.
140
141
142
143icewm 3.4.4 2023-11-03 ICEWM-KEYS(5)