Created keychord (markdown)

Yves Zoundi 2023-02-14 23:56:52 +00:00
parent e1beca4f41
commit 1bd4d6dfb0

27
keychord.md Normal file

@ -0,0 +1,27 @@
### Description
This patch implements sequences for chained keybindings (like the dwm [keychord](https://dwm.suckless.org/patches/keychord/) patch).
_Notes_:
- The maximum number of sequences is set to `5` in the `Keychord` struct for a given keybinding
- This bundles the [keycodes](https://github.com/djpohly/dwl/wiki/keycodes) patch as an implementation dependency, maybe that can be avoided...
### Example
In the example below, the menu command is bound to the sequence `Control-t Control-O`.
```C
static const Keychord keychords[] = {
/* Note that Shift changes certain key codes: c -> C, 2 -> at, etc. */
/* count key_sequences function argument */
{ 2, {{MODKEY, PREFIXKEY}, {MOD_CONTROL, Key_o}}, spawn, { .v = menucmd } }
};
```
### Download
- [2023-02-14](https://github.com/djpohly/dwl/compare/main...yveszoundi:dwl:v0.4-keychord-2023-02-14.patch)
### Authors
- [Yves Zoundi](https://github.com/yveszoundi)