mirror of
https://codeberg.org/dwl/dwl-patches.git
synced 2025-09-08 12:14:50 +00:00

The odd name was necessary historically to keep the directory visible at the top of a large list of patches. This is no longer necessary.
1.6 KiB
1.6 KiB
Description
This patch implements sequences for chained keybindings (like the dwm keychord patch).
Notes:
- The maximum number of sequences is set to
5
in theKeychord
struct for a given keybinding - This original motivation was better support for stumpwm style of keybindings, however this is not a limitation
Example
The default values for MODKEY
and PREFIXKEY
can be changed in config.def.h
and/or config.h
.
emacs-like
In the example below, the firefox
command is bound to the key sequence alt-s alt-u f
.
static const Keychord keychords[] = {
/* Note that Shift changes certain key codes: c -> C, 2 -> at, etc. */
/* count key_sequences function argument */
{ 3, {{MODKEY, XKB_KEY_s}, {MODKEY, XKB_KEY_u}, {MOD_NONE, XKB_KEY_f}}, spawn, SHCMD("firefox") },
};
vim-like
In the example below, the firefox
command is bound to the key sequence alt-s u f
.
static const Keychord keychords[] = {
/* Note that Shift changes certain key codes: c -> C, 2 -> at, etc. */
/* count key_sequences function argument */
{ 3, {{MODKEY, XKB_KEY_s}, {MOD_NONE, XKB_KEY_u}, {MOD_NONE, XKB_KEY_f}}, spawn,SHCMD("firefox") },
};