input: add support for modifyOtherKeys=2

Similar to modifyOtherKeys=1 (foot’s default, and only, mode), except
that:

* All modifiers (and not just Ctrl) generate \E[27;m;n~ escapes
* Regular keys (with modifiers) also generate \E[27;m;n~ escapes (for
  example, C-h no longer generates ^H, but \E[27;5;104~)

For our keymap based lookups, this is handled by adding
MOD_MODIFY_OTHER_KEYS_STATE<N> variants.

For “generic” keys, we simply adjust the conditions for when to emit a
\E[27;m;n~ escape - the only requirement is that at least one modifier
is active.
This commit is contained in:
Daniel Eklöf 2021-11-11 17:43:39 +01:00
parent 9412389051
commit 4a74050999
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
5 changed files with 90 additions and 32 deletions

View file

@ -46,6 +46,7 @@
* Color schemes are now installed to `${datadir}/foot/themes`.
* `[csd].border-width` and `[csd].border-color`, allowing you to
configure the width and color of the CSD border.
* Support for `XTMODKEYS` with `Pp=4` and `Pv=2` (_modifyOtherKeys=2_).
### Changed