Commit graph

23 commits

Author SHA1 Message Date
Daniel Eklöf
2de60eafb7
keymap: fix alt+return combos
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.
2020-11-19 19:22:52 +01:00
Daniel Eklöf
121b488e74
keymap: use same lookup table for Tab and ISO_Left_Tab
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
2020-11-19 19:22:48 +01:00
Daniel Eklöf
18e00a55f6
keymap: emit \E[27;2;13~ for all key combinations involving Shift+Return
This is what XTerm emits with `modifyOtherKeys=1`, which is foot’s only mode.
2020-09-07 22:20:13 +02:00
Daniel Eklöf
26528f6a73
input: add key mapping for XKB_KEY_KP_Decimal 2020-06-27 20:03:41 +02:00
Daniel Eklöf
7a82bcf7a5
keymap: remove trailing whitespaces 2020-04-08 17:54:52 +02:00
Daniel Eklöf
762ed04637
keymap: return: all Alt+<mod> now emits \e\r 2020-04-08 17:33:36 +02:00
Daniel Eklöf
b60c9d0b40
keymap: \t -> spaces 2020-04-08 17:31:21 +02:00
Michael Cardell Widerkrantz
81f518d5b3 Make Alt-Return send ESC Return 2020-03-16 21:28:40 +01:00
Daniel Eklöf
e8197d22f7
keymap: tab: handle all modifiers
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.
2020-02-21 19:14:46 +01:00
Daniel Eklöf
ae23023341
keymap: align backspace escapes with XTerm
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.
2020-02-21 19:11:03 +01:00
Daniel Eklöf
1472383c15
keymap: remove keymap table
Lookup is now done in code, using a switch-statement
2020-01-11 18:37:00 +01:00
Daniel Eklöf
8837309c2e
keymap: add KP enter
This makes the keypad enter key emit "\eOM" in keypad application
mode.
2020-01-11 12:37:07 +01:00
Daniel Eklöf
30f6480644
keymap: add escapes for keypad 'begin'
This is usually the '5' key, in non-num lock mode.
2020-01-10 20:23:56 +01:00
Daniel Eklöf
b8c552a5b7
keymap: add meta modifier mappings for keypad keys 2019-08-15 20:07:33 +02:00
Daniel Eklöf
2c16ec2687
keymap: add meta modifier mappings for non-keypad keys 2019-08-15 19:56:14 +02:00
Daniel Eklöf
9ca01436ee
input: track meta modifier 2019-08-15 19:38:28 +02:00
Daniel Eklöf
c5747fbd7d
keymap: don't ESC prefix return when 'shift' is held down 2019-08-15 19:24:46 +02:00
Daniel Eklöf
18fb70bb3f
keymap: fix sequences for PageDown 2019-07-22 18:45:14 +02:00
Daniel Eklöf
cb78c8cff6
keymap: map tab and back-tab 2019-07-18 14:54:43 +02:00
Daniel Eklöf
056700aa8f
keymap: use hex instead of octal 2019-07-17 11:18:55 +02:00
Daniel Eklöf
34f9d544fd
input: fix backspace escape sequences 2019-07-09 15:09:44 +02:00
Daniel Eklöf
cb8c2cdb35
input: split up keymap
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.
2019-07-09 15:05:07 +02:00
Daniel Eklöf
3dbef02dac
input: implement keypad application mode
This commit also replaces the previous (temporary) key map with a much
more complete one.
2019-07-09 14:27:26 +02:00