xhotkeys man page

xhotkeys — Bind keys and mouse events to commands in the X-Window


xhotkeys [options]


The purpose of xhotkeys is to provide a simple and easy configurable hotkey launcher for the X-Window System, independent from the desktop (Gnome, KDE, Xfce, ...) used.

Although xhotkeys has a graphical GTK+ configurator, it's possible to manage configuration files manually.


The xhotkeys daemon should be run after X user logs in. All desktop interfaces provide (or should provide) a way to do this automatically (for example, Gnome has the Startup Programs at Sessions). Take a look on the documentation.


-h | --help
Displays the help message and exit
-v | --verbose
Increase the level of verbosity (0: error, 1: info, 2: debug)
-c | --config
Start GTK+ configurator
-f | --configuration-file configuration_file
Alternative configuration file

Configuration File

By default, $HOME/.xhotkeys would be used. Any line beggining with # is ignored. Hotkeys are defined that way:


Hotkey names cannot use = character.

Available modifiers are: shift, control, alt, winkey, altgr, lock, and mod3. Available keys are all the strings defined in miscellany and latin1 Xlib source files. Both modifiers and keys are case-insensitive. Moreover, you can define some special key values:

@DIGIT@ meaning keycode = DIGIT (use for keys without X-name)

ButtonX meaning a mouse button (where X=1..5)


Window's Info=<alt><shift>@103@:xwininfo


Default configuration for current user
Last window's setting used on GTK+ configurator
Pidfile for running daemon
String definitions for latin1 keycodes.
String definitions for control keycodes.


USER and HOME are used to get username and user's home path.


SIGHUP makes the hotkey daemon to reload the configuration file and continue running.


Arnau Sanchez <arnau@ehas.org>.

Some ideas were taken from keylaunch (Ken Lynch and Stefan Pfetzing). Without their code this utility would have been painful to program.

See Also

keylaunch(1), xbindkeys(1), xev(1), xmodmap(1)


Arnau Sanchez X11