From 1bd4d6dfb001fba0cd5e0cee663c0f26e9bace3f Mon Sep 17 00:00:00 2001 From: Yves Zoundi Date: Tue, 14 Feb 2023 23:56:52 +0000 Subject: [PATCH] Created keychord (markdown) --- keychord.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 keychord.md diff --git a/keychord.md b/keychord.md new file mode 100644 index 0000000..fa745ce --- /dev/null +++ b/keychord.md @@ -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) \ No newline at end of file