aboutsummaryrefslogtreecommitdiff
path: root/keymap.h (follow)
Commit message (Collapse)AuthorAgeLines
* keymap: iso_left_tab: we no longer “consume” shift when matchingDaniel Eklöf2021-05-26-11/+9
| | | | | | | Thus, the modifier list needs to include MOD_SHIFT, or we wont match anything, causing us to hit the last entry, \E[Z. Closes #547
* keymap: handle shift+tab combos correctly, after consuming modifiersDaniel Eklöf2021-03-08-0/+19
| | | | | | | | | | | | | | | | | | | | | Shift+Tab is an odd bird in XKB; it produces a shifted variant of tab, ISO_Left_Tab, with Shift being a consumed modifier. From a terminal perspective, Tab and ISO_Left_Tab are the same key, with Shift+Tab generating ‘CSI Z’, and all other combos generating a ‘CSI 27;mods;9~’ escape. Before, when we didn’t filter out consumed modifiers, we could simply re-use the keymap for Tab when translating ISO_Left_Tab. This is no longer possible, since shift has been filtered out. As a result, Shift+Tab no longer generated ‘CSI Z’, but ‘\t’. I.e as if shift wasn’t being pressed. This patch adds a separate keymap table for ISO_Left_Tab. It’s MOD_ANY entry corresponds to Shift+Tab, and emits ‘CSI Z’. All its other entries *exclude* shift (since it has been consumed), *but*, the encoded modifier (in the escape sequences) *include* shift.
* keymap: add ‘CSI 27;<mod>;27~’ escapes for Esc with modifiersDaniel Eklöf2020-11-28-0/+15
|
* keymap: fix alt+return combosDaniel Eklöf2020-11-19-11/+11
| | | | | | | | All alt+return combos mapped to the same escape sequence as alt+return itself. With this patch, alt+<mod(s)>+return map to a standard ‘CSI 27;x;13~’ sequence.
* keymap: use same lookup table for Tab and ISO_Left_TabDaniel Eklöf2020-11-19-5/+1
| | | | | | | | | | | | | | With XKB, Shift+Tab maps to XKB_KEY_ISO_Left_Tab, not XKB_Key_Tab. Previously, we had two different lookup tables for the two. The tab table was correctly populated, while the ISO-left tab wasn’t. As a result, all Shift+Tab combos (except Shift+Tab itself) was wrong, and resulted in the same escape sequence as Shift+Tab. Fix by using the same table for both tab and ISO-left tab. Closes #210
* keymap: emit \E[27;2;13~ for all key combinations involving Shift+ReturnDaniel Eklöf2020-09-07-4/+11
| | | | This is what XTerm emits with `modifyOtherKeys=1`, which is foot’s only mode.
* input: add key mapping for XKB_KEY_KP_DecimalDaniel Eklöf2020-06-27-0/+1
|
* keymap: remove trailing whitespacesDaniel Eklöf2020-04-08-7/+7
|
* keymap: return: all Alt+<mod> now emits \e\rDaniel Eklöf2020-04-08-2/+9
|
* keymap: \t -> spacesDaniel Eklöf2020-04-08-1/+1
|
* Make Alt-Return send ESC ReturnMichael Cardell Widerkrantz2020-03-16-0/+1
|
* keymap: tab: handle all modifiersDaniel Eklöf2020-02-21-2/+17
| | | | | | | Tab is one of the keys included in our "otherModifierKeys" implementation. However, since the key sym falls outside the checks required to trigger it, special case it and implement its sequences as a table.
* keymap: align backspace escapes with XTermDaniel Eklöf2020-02-21-3/+16
| | | | | | | | | | | | | | | Backspace now emits DEL for all non-ctrl modifier combos, and BS for all ctrl modifier combos. The alt modifier prefixes DEL/BS with ESC. This also removes my own hack of mapping ctrl+backspace to alt+backspace. Describe backspace behavior in both the README and the man page. TODO: implement DECBKM to allow applications to toggle the backspace behavior.
* keymap: remove keymap tableDaniel Eklöf2020-01-11-89/+0
| | | | Lookup is now done in code, using a switch-statement
* keymap: add KP enterDaniel Eklöf2020-01-11-0/+2
| | | | | This makes the keypad enter key emit "\eOM" in keypad application mode.
* keymap: add escapes for keypad 'begin'Daniel Eklöf2020-01-10-0/+7
| | | | This is usually the '5' key, in non-num lock mode.
* keymap: add meta modifier mappings for keypad keysDaniel Eklöf2019-08-15-191/+64
|
* keymap: add meta modifier mappings for non-keypad keysDaniel Eklöf2019-08-15-154/+60
|
* input: track meta modifierDaniel Eklöf2019-08-15-0/+1
|
* keymap: don't ESC prefix return when 'shift' is held downDaniel Eklöf2019-08-15-1/+0
|
* keymap: fix sequences for PageDownDaniel Eklöf2019-07-22-7/+7
|
* keymap: map tab and back-tabDaniel Eklöf2019-07-18-0/+11
|
* keymap: use hex instead of octalDaniel Eklöf2019-07-17-3/+3
|
* input: fix backspace escape sequencesDaniel Eklöf2019-07-09-3/+3
|
* input: split up keymapDaniel Eklöf2019-07-09-381/+560
| | | | | | This makes the top level table smaller, and faster to search through. Eventually, we could do something fancy, like b-search the top level table.
* input: implement keypad application modeDaniel Eklöf2019-07-09-0/+454
This commit also replaces the previous (temporary) key map with a much more complete one.