xbindkeys - Man Page

a grabbing keys program for X

Synopsis

xbindkeys [ options ]

Description

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

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 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

Xbindkeysrc

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

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. 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

Examples

# control+shift+q starts xterm

"xterm"
  control+shift + q

# Menu key starts xbindkeys_show
"xbindkeys_show"
  Menu

# Control + mouse button 1 starts 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

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

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

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.

Note

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.

Bugs

If you find a bug, please send mail to <xbindkeys-devel@nongnu.org>

Homepage

http://www.nongnu.org/xbindkeys/

Author

Philippe Brochard <hocwp@free.fr>

Marcello Mathias Herreshoff for guile support <marcello@hummer.stanford.edu>

Files

$HOME/.xbindkeysrc
        The users configuration file.

$HOME/.xbindkeysrc.scm
        The users configuration file in scheme
        (if guile support has 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.

Info

Tue Apr 19 2014