xbindkeys - a grabbing keys program for X


xbindkeys [ options ]


XbindKeys is a program that grabs key and mouse button events in X and starts associated shell commands.


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 runs

-k, --key

Identify one key pressed (useful for configuration)

-mk, --multikey

Identify multi key pressed (useful for configuration)

-g, --geometry

size and position of window with -k|-mk option

-n, --nodaemon

don’t start as daemon

If guile support has not been disabled:
-dg, --defaults-guile

Print a default guile configuration file

-fg, --file-guile

Use an alternative guile configuration file


XBindKeys default configuration file is at $HOME/.xbindkeysrc, used only for one user.

The configuration file consists of commands 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 configuration with --defaults


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. Modifiers are not case sensitive.

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

keystate_numlock = enable
keystate_capslock = enable
keystate_scrolllock= enable


# control+shift+q starts xterm
control+shift + q

# Menu key starts xbindkeys_show

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

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

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


A scheme configuration can be used if guile support has not been disabled. The standard configuration is loaded only if the scheme configuration is not available.

For more details, please see here

Note: The guile configuration file is prefered for non trivial
configurations, for example double click, timed click or key combinations.

The default location is ~/.xbindkeysrc.scm

Use xbindkeys --defaults-guile for more details.

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


xbindkeys reloads the configuration file if modified. Send a HUP signal to force reloading:

killall -HUP xbindkeys

When a HUP signal is sent to xbindkeys, changes take effect only after moving the mouse.


If you find a bug, please send mail to <xbindkeys-devel [AT]>



Philippe Brochard <hocwp [AT]>
Marcello Mathias Herreshoff for guile support <marcello [AT]>


The users configuration file.

The users configuration file in scheme
(if guile support has not been disabled).


Utility for showing the actual keybinding with xbindkeys
Utility for modifying keymap & button mappings in X.
Print contents of X events.

X11 KeySym definitions.