1FLUXBOX-KEYS(5)                                                FLUXBOX-KEYS(5)
2
3
4

NAME

6       fluxbox-keys - keyboard shortcuts configuration for fluxbox(1)
7

SYNOPSIS

9       ~/.fluxbox/keys
10
11

SYNTAX

13       Variable parameters are shown in emphasis: argument
14
15       Optional parameters are shown in square brackets: [argument]
16
17       All other characters shown are required verbatim. Whitespace is
18       required where shown, but it is fine to add more whitespace.
19
20

DESCRIPTION

22       The keys file defines the keyboard shortcuts for fluxbox(1).
23
24       You can customize fluxbox´s key handling through the ~/.fluxbox/keys
25       file. The file consists of lines of the basic format:
26
27       [modifiers] key :command [arguments ...]
28
29       The space between the key and the : before the command is mandatory.
30
31       All modifiers and commands are case-insensitive. Some command arguments
32       (especially those that will be passed to the shell) are case-sensitive.
33       Some key names are case-sensitive.
34
35       Lines beginning with a # or ! are considered comments and are unread by
36       fluxbox.
37
38

MODIFIERS

40       You can get a list of possible modifiers by calling `xmodmap -pm´. This
41       also shows you to which keys the modifiers are mapped, but the
42       following modifiers are most commonly used:
43
44       Shift Control Mod1 Mod4
45
46       where Mod1 is the Alt key on the PC keyboard and Mod4 is usually a key
47       branded with a familiar company logo.
48
49       There are also some special modifiers that refer to mouse button
50       presses:
51
52           OnDesktop
53               The mouse cursor is over the desktop (root window), and not any
54               window.
55
56           OnToolbar
57               The mouse cursor is over the toolbar (which is normally at the
58               bottom of the screen).
59
60           OnWindow
61               The mouse cursor is over a window.
62
63           OnTitlebar
64               The mouse cursor is over a window´s titlebar.
65
66           Double
67               Limits this action to double-clicks only.
68
69   Combining Modifiers
70       To combine two or more modifiers, just list them (space-delimited) in
71       any order.
72
73

KEYS

75       You may specify a key by its key name (for example, a or space) or by
76       its numeric keycode (for example, 38 or 0xf3).
77
78       If you don´t know the name of a key, you can run xev(1) in a terminal,
79       push the key, and see the name in the output. If you have some
80       "special" keys that do not produce a key name in the output of xev(1),
81       you can just use the keycode (NOT the keysym!) in your keys file.
82
83       Commands can also be bound to mouse button presses, for which the
84       proper "key" name is Mousen where n is the number of the mouse button.
85       For example, Mouse1 is the primary button, and Mouse4 / Mouse5 are the
86       scroll wheel events, in normal configurations. xev(1) can also be used
87       to tell the button number.
88
89

CHAINING

91       Key bindings can be chained in a fashion similar to Emacs key bindings
92       using the syntax:
93
94       modifiers-1 key-1 modifiers-2 key-2 :command [arguments ...]
95
96       Example 1. To Bind CTRL+C CTRL+X (Which means, press CTRL+C then
97       CTRL+X) to quit fluxbox
98
99           Control c Control x :Quit
100

KEYMODES

102       A specific set of key mappings can be activated and de-activated
103       on-the-fly using what are called keymodes. The syntax to define a
104       mapping in a keymode is:
105
106       keymode: modifiers key :command [arguments ...]
107
108       Where keymode is any alpha-numeric string name.
109
110       When this keymode is activated (see the KeyMode command below), all
111       bindings prefaced by that keymode name become active (and all other
112       keybindings will be deactivated) until the keymode changes again.
113
114

COMMANDS

116       Some commands have multiple names which are shown below as:
117           CMD1 | CMD2
118
119       Related commands have been grouped below as:
120           CMD1 / CMD2
121
122       The commands are broken up into sections as follows:
123
124           ·   Mouse Commands
125
126           ·   Window Commands
127
128           ·   Workspace Commands
129
130           ·   Menu Commands
131
132           ·   Window Manager Commands
133
134           ·   Special Commands
135
136   Mouse Commands
137       These commands may only be bound to mouse buttons (plus modifiers), not
138       keystrokes. In all cases, the action finishes when the mouse button is
139       released.
140
141       StartMoving
142           Start dragging to move the window.
143
144       StartResizing [corner]
145           Start dragging to resize the window as if you had grabbed the
146           window at the specified corner.
147
148           By default corner is BottomRight, but may be overridden with one
149           of:
150
151               NearestCorner NearestEdge Center TopLeft Top TopRight Left
152               Right BottomLeft BottomRight
153
154       StartTabbing
155           Start dragging to add this window to another´s tabgroup.
156
157   Window Commands
158       These commands ordinarily affect only the currently focused window. The
159       OnWindow modifier and ForEach command may affect the window that is
160       used.
161
162       Minimize | MinimizeWindow | Iconify
163           Minimize the current window, equivalent to the window button.
164
165       Maximize | MaximizeWindow
166           Maximize the current window, equivalent to the window button.
167
168       MaximizeHorizontal / MaximizeVertical
169           Maximize the current window in one direction only, leaving the
170           other dimension unchanged.
171
172       Raise / Lower
173           Reorder this window to the top or bottom of the window stack,
174           within its current layer. See fluxbox(1) for a discussion of
175           layers.
176
177       RaiseLayer / LowerLayer
178           Raise the window up to the layer above, or lower it to the layer
179           below. See fluxbox(1) for a discussion of layers.
180
181       SetLayer layer
182           Move the window to the specified layer.  layer should be one of
183           AboveDock, Dock, Top, Normal, Bottom, Desktop. See fluxbox(1) for a
184           discussion of layers.
185
186       Close
187           Close the current window, equivalent to the window button.
188
189       Kill | KillWindow
190           Close a window that´s not responding to Close, like using xkill.
191
192       Shade | ShadeWindow
193           Toggle the shaded state of the current window, equivalent to the
194           window button. A shaded window appears as only the title bar.
195
196       ShadeOn / ShadeOff
197           Set the shaded state of the window to On / Off.
198
199       Stick | StickWindow
200           Toggle the sticky state of the current window, equivalent to the
201           window button. A sticky window is visible on all workspaces.
202
203       SetDecor decor
204           Sets which window decorations will be shown.  decor has the same
205           format as the ` parameter in the apps file. See `man fluxbox
206           section APPLICATIONS for more info.
207
208       ToggleDecor
209           Toggles the presence of the window decorations (title bar, window
210           buttons, and resize bar).
211
212       NextTab / PrevTab
213           Cycle to the next / previous tab in the current tab group.
214
215       Tab number
216           Cycle to the given tab in the current tab group, where 1 is the
217           first tab. A negative number counts from the end of the tab group
218           (-1 is the last tab, -2 is the next-to-last, etc.).
219
220       MoveTabRight / MoveTabLeft
221           Reorder the tabs in the current tab group, swapping the current tab
222           with the one to the right / left.
223
224       DetachClient
225           Remove the current tab from the tab group, placing it in its own
226           window.
227
228       ResizeTo width height
229           Resizes the window to the given width and height.
230
231       Resize delta-width delta-height
232           Resizes the window relative to the current width and height.
233
234       ResizeHorizontal delta-width / ResizeVertical delta-height
235           Resizes the window in one dimension only
236
237       MoveTo x y [anchor]
238           Moves the window to the given coordinates, given in pixels.
239
240           If either x or y is set to *, that coordinate will be ignored, and
241           the movement will only take place in one dimension.
242
243           The default anchor is the upper left corner, but this may be
244           overridden with one of:
245
246               TopLeft Left BottomLeft Top Center Bottom TopRight Right
247               BottomRight
248
249       Move delta-x delta-y
250           Moves the window relative to its current position. Positive numbers
251           refer to right and down, and negative to left and up, respectively.
252
253       MoveRight d / MoveLeft d / MoveUp d / MoveDown d
254           Moves the window relative to its current position by the number of
255           pixels specified in d. If the number is negative, it moves in the
256           opposite direction.
257
258       TakeToWorkspace workspace / SendToWorkspace workspace
259           Sends you along with the current window to the selected workspace.
260           SendToWorkspace just sends the window. The first workspace is
261           number 1, not 0.
262
263       TakeToNextWorkspace [offset] / TakeToPrevWorkspace [offset]
264           Sends you along with the current window to the next or previous
265           workspace. If you set offset to a value greater than the default of
266           1, it will move you that number of workspaces ahead or behind. If
267           you go beyond the end of the currently defined workspaces, it will
268           wrap around to the other end automatically.
269
270       SendToNextWorkspace [offset] / SendToPrevWorkspace [offset]
271           Identical to the "TakeTo..." commands, but again this sends only
272           the window, and does not move you away from your current workspace.
273
274       SetAlpha [alpha [unfocused-alpha]]
275           Sets the alpha value of a window.
276
277           Putting a + or - in front of the value adds or subtracts from the
278           current value. A plain integer sets the value explicitly.
279
280           no arguments
281               Resets both focused and unfocused settings to default opacity.
282
283           one argument
284               Changes both focused and unfocused alpha settings.
285
286           two arguments
287               First value becomes the focused alpha, second becomes the
288               unfocused alpha value.
289
290       SetHead number
291           Moves the window to the given display head. Only available when
292           fluxbox has been compiled with Xinerama support.
293
294       SendToNextHead [offset] / SendToPrevHead [offset]
295           Sends the current window to the next/previous display head. If you
296           specify an offset greater than 1, it will move the window that many
297           heads. If this takes the window beyond the total number of heads,
298           it will wrap around to the beginning.
299
300   Workspace Commands
301       These commands affect the entire workspace (or "desktop" as it is
302       sometimes called).
303
304       AddWorkspace / RemoveLastWorkspace
305           Adds or removes a workspace from the end of the list of workspaces.
306
307       NextWorkspace [n] / PrevWorkspace [n] / RightWorkspace [n] /
308       LeftWorkspace [n]
309           Switch to the Next / Previous workspace. All versions accept an
310           offset value n, which defaults to 1 and refers to the number of
311           workspaces to move at one time. {Next,Prev}Workspace wrap around
312           when going past the last workspace, whereas {Right,Left}Workspace
313           do not.
314
315       Workspace number
316           Jumps to the given workspace number. The first workspace is 1.
317
318       NextWindow [{options}] [pattern] / PrevWindow [{options}] [pattern]
319           Focuses the next / previous window in the focus list.
320
321           options is one or more of the following, space delimited:
322
323               static
324                   Instead of moving in order of most-recent focus, move in
325                   order of when the window was opened (or, the order shown in
326                   the iconbar).
327
328               groups
329                   Only include the current tab in windows with multiple tabs.
330
331               If pattern arguments are supplied, only windows that match all
332               the patterns are considered - all others are skipped. See the
333               section CLIENT PATTERNS below for more information.
334
335               This pair of commands has a special side-effect when the
336               keybinding used has a modifier - It will temporarily raise the
337               cycled window to the front so you can see it, but if you
338               continue holding down the modifier and press the key again (For
339               example, keep holding "Alt" while you tap the "Tab" key a few
340               times), fluxbox will lower the window again when you move on to
341               the next one. This allows you to preview the windows in order,
342               but does not change the order in doing so.
343
344       NextGroup [{options}] [pattern] / PrevGroup [{options}] [pattern]
345           Equivalent to NextWindow / PrevWindow above, but with the groups
346           option forced on.
347
348       GotoWindow number [{options}] [pattern]
349           Focuses and activates the window at position number in the focus
350           list. The options and pattern arguments have the same meaning as
351           NextWindow above.
352
353       Activate [pattern] | Focus [pattern]
354           With pattern, this is an alias for GoToWindow 1 pattern. Without,
355           this behaves like a window command, so that OnWindow events can
356           change the focused window.
357
358       Attach pattern
359           Combines all windows that match the pattern into a single tab
360           group. See CLIENT PATTERNS for more about the pattern arguments.
361
362       FocusLeft / FocusRight / FocusUp / FocusDown
363           Focus to the next window which is located in the direction
364           specified.
365
366       ArrangeWindows pattern
367           Tries to arrange all windows on the current workspace so that they
368           overlap the least amount possible. See CLIENT PATTERNS for more
369           about the pattern arguments.
370
371       ShowDesktop
372           Minimizes all windows on the current workspace. If they are already
373           all minimized, then it restores them.
374
375       Deiconify mode destination
376           Deiconifies windows (or, restores from a minimized state).
377
378           Where mode may be one of:
379
380               All
381                   All icons across all workspaces.
382
383               AllWorkspace
384                   All icons on the current workspace.
385
386               Last
387                   The last icon across all workspaces.
388
389               LastWorkspace (default)
390                   The last icon on the current workspace.
391
392           And destination may be one of:
393
394               Current (default)
395                   Deiconify to the current workspace.
396
397               OriginQuiet
398                   Deiconify to the window´s original workspace, but does so
399                   in the background, without moving you there.
400
401       SetWorkspaceName name / SetWorkspaceNameDialog
402           Sets the name of the current workspace.
403
404       CloseAllWindows
405           Closes all windows on all desktops.
406
407   Menu Commands
408       These commands open or close fluxbox popup menus. For more information
409       on what these menus contain or how to configure them, see fluxbox(1).
410
411       RootMenu / WorkspaceMenu / WindowMenu
412           Opens the specified menu. See fluxbox(1) for more details on what
413           these menus contain.
414
415       ClientMenu [pattern]
416           Opens a menu that contains all windows. If you specify a pattern,
417           only matching windows will be in the menu. See CLIENT PATTERNS
418           below for more details on the pattern argument.
419
420       CustomMenu path
421           Opens a custom menu file.
422
423       HideMenus
424           Hide all fluxbox popup menus.
425
426   Window Manager Commands
427       These commands affect the Window Manager, or more than one window.
428
429       Restart [path]
430           Restarts fluxbox. This does not close any running applications. If
431           the optional path is a path to an executable window manager, that
432           manager is started in place of fluxbox.
433
434       Quit | Exit
435           Exits fluxbox. This will normally cause X to stop as well and
436           terminate all existing applications, returning you to the login
437           manager or console.
438
439       Reconfig | Reconfigure
440           Reloads all fluxbox configuration files including the keys file,
441           apps file, and init file, if they have changed.
442
443       SetStyle path
444           Sets the current style to that given in path, which must be the
445           full path to a fluxbox style.
446
447       ReloadStyle
448           Reloads only the current style. Useful after editing a style which
449           is currently in use.
450
451       ExecCommand args ... | Exec args ... | Execute args ...
452           Probably the most-used binding of all. Passes all the arguments to
453           your $SHELL (or /bin/sh if $SHELL is not set). You can use this to
454           launch applications, run shell scripts, etc. Since all arguments
455           are passed verbatim to the shell, you can use environment
456           variables, pipes, or anything else the shell can do. Note that
457           processes only see environment variables that were set before
458           fluxbox started (such as in ~/.fluxbox/startup), or any that are
459           set via the Export or SetEnv commands, below.
460
461       CommandDialog
462           Pops up a dialog box that lets you type in any of these commands
463           manually.
464
465       SetEnv name value | Export name=value
466           Sets an environment variable in Fluxbox. It will be passed to any
467           applications spawned by any future ExecCommand commands.
468
469       SetResourceValue resourcename resourcevalue | SetResourceValueDialog
470           Sets a fluxbox resource value, which are normally stored in the
471           init file. See fluxbox(1) for more details on available resources
472           and allowed values.
473
474   Special Commands
475       These commands have special meanings or behaviors.
476
477       MacroCmd {command1} {command2} {command3} ...
478           Allows you to execute more than one command with one keybinding.
479           The commands will be executed in series. The { } brackets are
480           literally required, as in the following example:
481
482               MacroCmd {MoveTo 0 0} {ResizeTo 1280 800}
483
484       Delay {command} [microseconds]
485           Delays running command for the given amount of time. If the same
486           key binding is activated again, the timer will be restarted.
487
488       ToggleCmd {command1} {command2} ...
489           Alternates between the commands. On the first press of the bound
490           key, runs command1. On the next press, runs command2.
491
492       BindKey keybinding
493           Adds the given keybinding (which must be a valid key binding as
494           defined in the DESCRIPTION section above) to your keys file.
495
496       KeyMode keymode [return-keybinding]
497           Activates the named keymode (or, all key binding lines prefaced
498           with the same keymode:) and deactivates all others until the
499           return-keybinding (by default Escape) is pressed. The default
500           keymode is named default.
501
502       ForEach {command} [{condition}] | Map {command} [{condition}]
503           Runs the given command (normally one from the Window Commands
504           section above) on each window. If you specify a condition (See
505           Conditions, below) the action will be limited to matching windows.
506
507       If {condition} {then-command} [{else-command}] | Cond {condition}
508       {then-command} [{else-command}]
509           If the condition command returns true, then run the then-command,
510           otherwise run the optional else-command. See Conditions below for
511           more information on the condition argument.
512
513   Conditions
514       These special commands are used to match windows conditionally. They
515       are commonly used by the If and ForEach command.
516
517       Matches pattern
518           Returns true if the current window matches the given pattern. See
519           CLIENT PATTERNS below for details on the pattern syntax.
520
521           If your key binding uses the OnWindow modifier, it matches against
522           the window you clicked, not the currently focused window.
523
524           To check other windows besides the currently focused one, see the
525           Every and Some conditions below.
526
527       Some condition
528           Retuns true if any window on any workspace (not just the currently
529           focused one) matches the condition.
530
531       Every condition
532           Retuns true if every window on every workspace (not just the
533           current one) matches the condition.
534
535       Not condition
536           Returns true if condition returns false, and vice-versa.
537
538       And {condition1} {condition2} [{condition3} ...]
539           Returns true if and only if all given conditions return true.
540
541       Or {condition1} {condition2} [{condition3} ...]
542           Returns true if any of the listed conditions return true.
543
544       Xor {condition1} {condition2} [{condition3} ...]
545           Returns the boolean xor of the truth values for all conditions
546           listed.
547

CLIENT PATTERNS

549       Many of the more advanced commands take a pattern argument, which
550       allows you to direct the action at a specific window or set of windows
551       which match the properties specified in the pattern. A pattern looks
552       like this:
553
554       ([propertyname[!]=]regexp) ...
555
556       Match definitions are enclosed in parentheses (...), and if no
557       propertyname is given then Name is assumed. The regexp can contain any
558       regular expression, or the special value [current], which matches the
559       corresponding value of the currently focused window. See regex(7) for
560       more information on acceptable regular expressions.
561
562       You can use = to test for equality or != to test for inequality.
563
564       The following values are accepted for propertyname:
565
566           Name
567               A string, corresponding to the CLASSNAME property.
568
569           Class
570               A string, corresponding to the CLASSCLASS property.
571
572           Title
573               A string, corresponding to the window title.
574
575           Role
576               A string, corresponding to the ROLE property.
577
578           Transient
579               Either yes or no, depending on whether the window is transient
580               (typically, a popup dialog) or not.
581
582           Maximized
583               Either yes or no, depending on whether the window is maximized
584               or not.
585
586           Minimized
587               Either yes or no, depending on whether the window is minimized
588               (iconified) or not.
589
590           Shaded
591               Either yes or no, depending on whether the window is shaded or
592               not.
593
594           Stuck
595               Either yes or no, depending on whether the window is sticky (on
596               all workspaces) or not.
597
598           FocusHidden
599               Either yes or no, depending on whether the window has asked to
600               be left off the focus list (or, the alt-tab list), or not.
601
602           IconHidden
603               Either yes or no, depending on whether the window has asked to
604               be left off the icon list (or, the taskbar), or not.
605
606           Urgent
607               Either yes or no, depending on whether the window has the
608               urgent hint set.
609
610           Workspace
611               A number corresponding to the workspace number to which the
612               window is attached. The first workspace here is 0.
613
614           WorkspaceName
615               A string corresponding to the name of the workspace to which
616               the window is attached.
617
618           Head
619               The number of the display head to which the window is attached.
620               You may match this against the special value [mouse] which
621               refers to the head where the mouse pointer currently resides.
622
623           Layer
624               The string name of the window´s layer, which is one of
625               AboveDock, Dock, Top, Normal, Bottom, Desktop
626
627       Example 2. Matches any windows with the CLASSNAME of "xterm"
628
629           (xterm)
630
631       Example 3. Matches any windows with the same CLASSNAME as the currently
632       focused window
633
634           (Name=[current])
635
636       Example 4. Matches any windows on the same head as the mouse but on a
637       different layer than the currently focused window
638
639           (Head=[mouse]) (Layer!=[current])
640

FILES

642       ~/.fluxbox/keys
643           This is the default location for the keybinding definitions.
644
645       /usr/X11R6/include/X11/keysymdef.h
646           X key names are in this file.
647
648       /usr/X11R6/lib/X11/XKeysymDB
649           X key names are also in this file.
650

RESOURCES

652       session.keyFile: <location>
653           This may be set to override the location of the keybinding
654           definitions.
655

ENVIRONMENT

657       Remember that ExecCommand command can take advantage of other
658       environment variables if they are set before fluxbox is started, or via
659       the Export or SetEnv commands. For example, if $TERM is set, it could
660       be use like this:
661
662
663           Mod1 x :ExecCommand $TERM
664       For more information about environment variables, see your shell´s
665       manual.
666
667

EXAMPLES

669       Here are some interesting and/or useful examples you can do with your
670       keys file.
671
672
673           # Mod4+drag moves a window
674           OnWindow Mod4 Mouse1 :StartMoving
675
676           # If any xterm windows are open, cycle through them. If none are open, open
677           # one:
678           Mod4 t :If {Some Matches (xterm)} {NextWindow (xterm)} {Exec xterm}
679
680           # Set a different wallpaper on every workspace:
681           ChangeWorkspace :Exec fbsetbg ~/.fluxbox/bg$(xprop -root _NET_CURRENT_DESKTOP | awk ´{print $3}´).png
682

AUTHOR AND CREDITS

684       This manpage is the combined work of:
685
686
687       ·   Jim Ramsay <i.am at jimramsay com> (>fluxbox-1.0.0)
688
689       ·   Curt Micol <asenchi at asenchi com> (>fluxbox-0.9.11)
690
691       ·   Tobias Klausmann <klausman at users sourceforge net>
692           (⇐fluxbox-0.9.11)
693
694       ·   Grubert <grubert at users sourceforge net> (fluxbox)
695
696       ·   Matthew Hawkins <matt at mh dropbear id au> (blackbox)
697
698       ·   Wilbert Berendsen <wbsoft at xs4all nl> (blackbox)
699
700       ·   Numerous other languages could be available if someone jumps in.
701

SEE ALSO

703       fluxbox(1), xev(1), xkill(1), regex(7)
704
705
706
707
708                                  08/21/2008                   FLUXBOX-KEYS(5)
Impressum