xbindkeys (1) - Linux Manuals

xbindkeys: a grabbing keys program for X

NAME

xbindkeys - a grabbing keys program for X

SYNOPSIS

xbindkeys [ options ]

DESCRIPTION

XbindKeys is a program that grab keys and mouse button events in X and starts associated shell command.

COMMAND LINE OPTIONS

Available command line options are as follows:
-d, --defaults
Print a default rc file
-f, --file
Use an alternative rc file
-h, --help
Short help on options plus version/author info.
-X, --display
Set X display to use
-v, --verbose
More information on xbindkeys when it run

-k, --key
Identify one key pressed (useful to fill the configuration file)

-mk, --multikey
Identify multi key pressed (useful to fill the configuration file)

-g, --geometry
size and position of window with -k|-mk option

-n, --nodaemon
don't start as daemon

If guile support have not been disabled:

-dg, --defaults-guile
Print a default guile configuration file

-fg, --file-guile
Use an alternative guile configuration file

XBINDKEYSRC

XBindKeys uses a configuration files. This file is $HOME/.xbindkeysrc, used only for one user. All whitespace is ignored in the files except for within the commands names double quotes.

The configuration file consists of commands names in double quotes, and associated keys in the next line.

Comments are started with a pound (#) and extend to the end of the line.

You can see a default file with the --defaults option or create a default $HOME/.xbindkeysrc with

 'xbindkeys --defaults > $HOME/.xbindkeysrc'.

KEYSYMS

The program expects combinations of keysyms to be used by using plus(+) characters to combine them together.

The format of a command line is:

    "command to start &"
       associated key
To specify an associated key, you can use 'xbindkeys --key' or
 'xbindkeys --multikey' and put one of the two lines in the  configuration file.

A list of keys is in /usr/include/X11/keysym.h and in /usr/include/X11/keysymdef.h. The XK_ is not needed.

List of modifiers:

    Release, Control, Shift, Mod1 (Alt), Mod2 (NumLock),
    Mod3 (CapsLock), Mod4, Mod5 (Scroll).
The release modifier is not a standard X modifier, but you can use it if you want to catch release events instead of press events.

By defaults, xbindkeys does not pay attention with the modifiers NumLock, CapsLock and ScrollLock. Add the lines above in the configuration file, if you want to pay attention to them.


 keystate_numlock enable

    keystate_capslock = enable
    keystate_scrolllock= enable

EXAMPLES

# control+shift+d starts an xterm (it's a comment)

"xterm" 
  control+shift + q

# Menu key starts xbindkeys_show
"xbindkeys_show"
  Menu

# Control + mouse button 1 starts an xterm
"xterm"
  Control + b:1

# Control+Shift+a  release event starts rxvt
"rxvt"
  release+control+shift + a

# Control + mouse button 2 release event starts rxvt
"rxvt"
  Control + b:2 + Release

SCHEME CONFIGURATION STYLE

If the guile support have not been disabled, you can use an alternate configuration file written in scheme. xbindkeys read first the scheme configuration file, and if this file doesn't exist, it read the standard configuration file.

For more details, please see here

  http://www.gnu.org/software/guile/guile.html

Note: The guile configuration file is the prefered way if you have a non trivial
configuration like for example double click, timed click or keys combinations.

The defaults is ~/.xbindkeysrc.scm

Use xbindkeys --defaults-guile for more details.

And xbindkeys --defaults-guile > ~/.xbindkeysrc.scm to use this method.

NOTE

xbindkeys reload its configuration file each time it has changed. But if you want to force it reloading its configuration file, you can send a HUP signal:

killall -HUP xbindkeys

When HUP signal is send to xbindkeys, changes in $HOME/.xbindkeysrc takes effect only after moving mouse.

BUGS

If you find a bug, please send a mail to <hocwp [at] free.fr>

HOMEPAGE

http://hocwp.free.fr/xbindkeys

AUTHOR

Philippe Brochard <hocwp [at] free.fr>
Marcello Mathias Herreshoff for the guile support <marcello [at] hummer.stanford.edu>

FILES

$HOME/.xbindkeysrc
        The users configuration file.

$HOME/.xbindkeysrc.scm
        The users configuration file in scheme style (if guile support have not been disabled).

SEE ALSO

xbindkeys_show
    Utility for showing the actual keybinding with xbindkeys
xmodmap(1x)
    Utility for modifying keymap & button mappings in X.
xev(1x)
    Print contents of X events.
/usr/include/X11/keysymdef.h
    X11 KeySym definitions.