diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2022-04-19 15:25:06 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2022-04-19 15:25:06 +0000 |
| commit | 8485cdaaaa5f26d3c12dbffd07fd9061ed10f56a (patch) | |
| tree | 347f99bceb4fe7a9008233217844434c3c2fedb2 | |
| parent | wayland: remove selection_override_modmask member (diff) | |
csi: implement CSI > 4n (reset modifyOtherKeys)
| -rw-r--r-- | CHANGELOG.md | 4 | ||||
| -rw-r--r-- | csi.c | 18 | ||||
| -rw-r--r-- | doc/foot-ctlseqs.7.scd | 8 |
3 files changed, 29 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 38450ab3..081a513c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -60,6 +60,10 @@ is similar to `show-urls-launch`, but does not automatically exit URL mode after activating an URL (https://codeberg.org/dnkl/foot/issues/964). +* Support for `CSI > 4 n`, disable _modifyOtherKeys_. Note that since + foot only supports level 1 and 2 (and not level 0), this sequence + does not disable _modifyOtherKeys_ completely, but simply reverts it + back to level 1 (the default). ### Changed @@ -1497,6 +1497,24 @@ csi_dispatch(struct terminal *term, uint8_t final) } break; /* final == 'm' */ + case 'n': { + int resource = vt_param_get(term, 0, 2); /* Default is modifyFuncionKeys */ + switch (resource) { + case 0: /* modifyKeyboard */ + case 1: /* modifyCursorKeys */ + case 2: /* modifyFunctionKeys */ + break; + + case 4: /* modifyOtherKeys */ + /* We don’t support fully disabling modifyOtherKeys, + * but simply revert back to mode ‘1’ */ + term->modify_other_keys_2 = false; + LOG_DBG("modifyOtherKeys=1"); + break; + } + break; + } + case 'u': { int flags = vt_param_get(term, 0, 0) & KITTY_KBD_SUPPORTED; diff --git a/doc/foot-ctlseqs.7.scd b/doc/foot-ctlseqs.7.scd index 8f23ebed..2759b625 100644 --- a/doc/foot-ctlseqs.7.scd +++ b/doc/foot-ctlseqs.7.scd @@ -563,8 +563,14 @@ manipulation sequences. The generic format is: | \\E[ > 4 ; _Pv_ m : XTMODKEYS : xterm -: Set level of the _modifyOtherKey_ property to _Pv_. Note that foot +: Set level of the _modifyOtherKeys_ property to _Pv_. Note that foot only supports level 1 and 2, where level 1 is the default setting. +| \\E[ > 4 n +: <unnamed> +: xterm +: Resets the _modifyOtherKeys_ property to level 1. Note that in foot, + this sequence does not completely disable _modifyOtherKeys_, since + foot only supports level 1 and level 2 (and not level 0). | \\E[ ? u : <unnamed> : kitty |
