From 4a740509996d3a7e8808593d1cbc0128b1ae03ed Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Thu, 11 Nov 2021 17:43:39 +0100 Subject: input: add support for modifyOtherKeys=2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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. --- terminal.h | 1 + 1 file changed, 1 insertion(+) (limited to 'terminal.h') diff --git a/terminal.h b/terminal.h index 10be6ae3..3516551f 100644 --- a/terminal.h +++ b/terminal.h @@ -308,6 +308,7 @@ struct terminal { bool focus_events; bool alt_scrolling; bool modify_escape_key; + bool modify_other_keys_2; /* True when modifyOtherKeys=2 (i.e. “CSI >4;2m”) */ enum cursor_origin origin; enum cursor_keys cursor_keys_mode; enum keypad_keys keypad_keys_mode; -- cgit v1.3