sxhkd - Simple X hotkey daemon
sxhkd is a simple X hotkey daemon with a powerful and compact configuration
Print the synopsis to standard output and
Print the version information to standard
output and exit.
Handle the first COUNT mapping notify
Timeout in seconds for the recording of chord
Read the main configuration from the given
Redirect the commands output to the given
Output status information to the given
is a daemon that listens to keyboard events and execute commands.
It reads its configuration file from $XDG_CONFIG_HOME/sxhkd/sxhkdrc
default, or from the given file if the -c
option is used.
Additional configuration files can be passed as arguments.
receives a SIGUSR1
) signal, it will
reload its configuration file (resp. toggle the grabbing state of all its
The commands are executed via SHELL -c COMMAND
can use environment variables).
will be the content of the first defined environment variable in
the following list: SXHKD_SHELL
If you have a non-QWERTY keyboard or a non-standard layout configuration, you
should provide a COUNT
to the -m
option or -1
(interpreted as infinity) if you constantly switch from one layout to the
other ( sxhkd
ignores all mapping notify events by default because the
majority of those events are pointless).
Each line of the configuration file is interpreted as so:
•If it is empty or starts with #, it is
•If it starts with a space, it is read
as a command.
•Otherwise, it is read as a
HOTKEY := CHORD_1 ; CHORD_2 ; ... ; CHORD_n
CHORD_i := [MODIFIERS_i +] [~][@]KEYSYM_i
MODIFIERS_i := MODIFIER_i1 + MODIFIER_i2 + ... + MODIFIER_ik
The valid modifier names are: super
The keysym names are given by the output of xev
Hotkeys and commands can be spread across multiple lines by ending each partial
line with a backslash character.
When multiple chords are separated by semicolons, the hotkey is a chord chain:
the command will only be executed after receiving each chord of the chain in
The colon character can be used instead of the semicolon to indicate that the
chord chain shall not be aborted when the chain tail is reached.
If a command starts with a semicolon, it will be executed synchronously,
key can be used to abort a chord chain.
is added at the beginning of the keysym, the command will be run on
key release events, otherwise on key press events.
is added at the beginning of the keysym, the captured event will be
replayed for the other clients.
Pointer hotkeys can be defined by using one of the following special keysym
, ..., button24
The hotkey and the command may contain sequences of the form
In addition, the sequences can contain ranges of the form A
are alphanumeric characters.
The underscore character represents an empty sequence element.
Bastien Dejean <nihilhill at gmail.com>
sxhkd at librelist.com