index.md (1943B)
1 Keychord 2 ======== 3 4 Description 5 ----------- 6 A patch that change the Key struct to Keychord, letting user map a sequence of 7 key instead of one singular keystroke. 8 9 *update 01/19/2022: 10 change implementation to use array and pointer instead of dynamic heap 11 allocation to minimize crash due heap allocation being too slow. 12 13 *update 07/19/2023: 14 changed grabkeys function to match the changes made in dwm-6.4. 15 16 *update 2026-07-17: 17 rebased onto `dwm` 6.8 and fixed event loss in the chord wait loop. While 18 waiting for the next key of a chord, every event that was not a `KeyPress` 19 was discarded. Discarding a `ButtonPress` that activated the `GrabModeSync` 20 passive grab from `grabbuttons()` left pointer and keyboard frozen: only 21 `buttonpress()`'s `XAllowEvents` can release that grab, and the loop cannot 22 exit on its own, because the frozen keyboard delivers no further 23 `KeyPress`. Ordinary input, `XTEST` and `xdotool` cannot break it; recovery 24 needs a synthetic `KeyPress` sent with `XSendEvent event_mask=0` to the 25 `_NET_SUPPORTING_WM_CHECK` window (`event_mask=0` delivers to the window's 26 creator, bypassing the fact that `dwm` selects no `KeyPressMask`), followed 27 by a synthetic `ButtonPress` to make `buttonpress()` run `XAllowEvents`. 28 Absent such a tool the session is lost. A `MapRequest` arriving mid-chord 29 was dropped the same way, leaving the window unmanaged. Events are now 30 dispatched through `handler[]` as `run()` does. 31 32 Download 33 -------- 34 * [dwm-keychord-20211210-a786211.diff](dwm-keychord-20211210-a786211.diff) (10/12/2021) 35 * [dwm-keychord-6.2.diff](dwm-keychord-6.2.diff) (01/19/2022) 36 * [dwm-keychord-6.4.diff](dwm-keychord-6.4.diff) (07/19/2023) (applies to dwm 6.5-6.8, not 6.4) 37 * [dwm-keychord-20260717-f63cde9.diff](dwm-keychord-20260717-f63cde9.diff) (2026-07-17) (latest version, dwm 6.8) 38 39 Authors 40 ------- 41 * Hai Nguyen - <hhai2105@gmail.com> 42 * Aaron Züger - <contact@azureorange.xyz> 43 * Lukasz Kasprzak - <lukas@labunix.xyz>