<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/keymap.h, branch 1.23.1</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.23.1</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.23.1'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2022-07-28T17:02:05Z</updated>
<entry>
<title>keymap: change alt+escape to emit \E\E instead of a CSI 27 sequence</title>
<updated>2022-07-28T17:02:05Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-07-26T16:19:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4abf46955f259ed392c5c7fbfbb931cbc7cc2b8e'/>
<id>urn:sha1:4abf46955f259ed392c5c7fbfbb931cbc7cc2b8e</id>
<content type='text'>
Closes #1105
</content>
</entry>
<entry>
<title>keymap: alt-tab (C-tab) now emits “ESC tab” by default</title>
<updated>2022-02-01T17:37:50Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-02-01T17:37:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=66801e4f336d3c8a99f454afbb914d6808907deb'/>
<id>urn:sha1:66801e4f336d3c8a99f454afbb914d6808907deb</id>
<content type='text'>
In our default mode (roughly equivalent to XTerm’s modifyOtherKeys=1),
alt-tab now emits ESC-tab instead of CSI 27;3;9~.

When modifyOtherKeys=2 is enabled (CSI &gt;4;2m), alt-tab emits the “old”
CSI 27 escape.

This better matches XTerm’s behavior.

Note that other alt-tab combos are ambiguous in XTerm, and thus they
are left unchanged here (i.e. we keep emitting CSI 27 escapes for
them).

Closes #900
</content>
</entry>
<entry>
<title>input: add support for modifyOtherKeys=2</title>
<updated>2021-11-13T10:09:07Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-11T16:43:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4a740509996d3a7e8808593d1cbc0128b1ae03ed'/>
<id>urn:sha1:4a740509996d3a7e8808593d1cbc0128b1ae03ed</id>
<content type='text'>
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&lt;N&gt; 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.
</content>
</entry>
<entry>
<title>keymap: iso_left_tab: we no longer “consume” shift when matching</title>
<updated>2021-05-26T07:13:58Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-05-25T05:53:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b5fb4a634b34381e1a68f879fc2c2dfb4efe874c'/>
<id>urn:sha1:b5fb4a634b34381e1a68f879fc2c2dfb4efe874c</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>keymap: handle shift+tab combos correctly, after consuming modifiers</title>
<updated>2021-03-08T19:30:25Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-28T10:50:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e4f164d9585d4e84de15061de6430d5c1c1a12ed'/>
<id>urn:sha1:e4f164d9585d4e84de15061de6430d5c1c1a12ed</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>keymap: add ‘CSI 27;&lt;mod&gt;;27~’ escapes for Esc with modifiers</title>
<updated>2020-11-28T10:50:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-11-28T10:50:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c213ee90f10c38041f5634c5c916e756337772d3'/>
<id>urn:sha1:c213ee90f10c38041f5634c5c916e756337772d3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>keymap: fix alt+return combos</title>
<updated>2020-11-19T18:22:52Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-11-19T18:20:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2de60eafb76e2e8879757523f5d4d836ee8613c3'/>
<id>urn:sha1:2de60eafb76e2e8879757523f5d4d836ee8613c3</id>
<content type='text'>
All alt+return combos mapped to the same escape sequence as alt+return
itself.

With this patch, alt+&lt;mod(s)&gt;+return map to a standard ‘CSI 27;x;13~’
sequence.
</content>
</entry>
<entry>
<title>keymap: use same lookup table for Tab and ISO_Left_Tab</title>
<updated>2020-11-19T18:22:48Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-11-19T18:15:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=121b488e7444234b6dc9d771b8178d45d1880b63'/>
<id>urn:sha1:121b488e7444234b6dc9d771b8178d45d1880b63</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>keymap: emit \E[27;2;13~ for all key combinations involving Shift+Return</title>
<updated>2020-09-07T20:20:13Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-09-07T20:03:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=18e00a55f62057ef63f6720239f5a857b585c82e'/>
<id>urn:sha1:18e00a55f62057ef63f6720239f5a857b585c82e</id>
<content type='text'>
This is what XTerm emits with `modifyOtherKeys=1`, which is foot’s only mode.
</content>
</entry>
<entry>
<title>input: add key mapping for XKB_KEY_KP_Decimal</title>
<updated>2020-06-27T18:03:41Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-06-27T18:03:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=26528f6a733d5f3c66eff403422a929470bec642'/>
<id>urn:sha1:26528f6a733d5f3c66eff403422a929470bec642</id>
<content type='text'>
</content>
</entry>
<entry>
<title>keymap: remove trailing whitespaces</title>
<updated>2020-04-08T15:54:52Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-04-08T15:54:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7a82bcf7a53c04c54cd5f2fa87258e398ac21ab2'/>
<id>urn:sha1:7a82bcf7a53c04c54cd5f2fa87258e398ac21ab2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>keymap: return: all Alt+&lt;mod&gt; now emits \e\r</title>
<updated>2020-04-08T15:33:36Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-04-08T15:33:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=762ed046372ca81204208495d6e2247ecf30252f'/>
<id>urn:sha1:762ed046372ca81204208495d6e2247ecf30252f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>keymap: \t -&gt; spaces</title>
<updated>2020-04-08T15:31:21Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-04-08T15:31:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b60c9d0b401bfd752430b02138ffaa852b86d424'/>
<id>urn:sha1:b60c9d0b401bfd752430b02138ffaa852b86d424</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Make Alt-Return send ESC Return</title>
<updated>2020-03-16T20:28:40Z</updated>
<author>
<name>Michael Cardell Widerkrantz</name>
<email>mc@hack.org</email>
</author>
<published>2020-03-16T20:28:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=81f518d5b3533e80ff6be68b777dea342f2d1620'/>
<id>urn:sha1:81f518d5b3533e80ff6be68b777dea342f2d1620</id>
<content type='text'>
</content>
</entry>
<entry>
<title>keymap: tab: handle all modifiers</title>
<updated>2020-02-21T18:14:46Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-02-21T18:14:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e8197d22f71f80d3737dc749e6bf61e2fd8ebd27'/>
<id>urn:sha1:e8197d22f71f80d3737dc749e6bf61e2fd8ebd27</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>keymap: align backspace escapes with XTerm</title>
<updated>2020-02-21T18:11:03Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-02-21T18:11:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ae23023341db2dc121f934dfe21e724d527da134'/>
<id>urn:sha1:ae23023341db2dc121f934dfe21e724d527da134</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>keymap: remove keymap table</title>
<updated>2020-01-11T17:37:00Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-01-11T17:37:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1472383c15d37e4077551cadc135e7bf7acc6c03'/>
<id>urn:sha1:1472383c15d37e4077551cadc135e7bf7acc6c03</id>
<content type='text'>
Lookup is now done in code, using a switch-statement
</content>
</entry>
<entry>
<title>keymap: add KP enter</title>
<updated>2020-01-11T11:37:07Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-01-11T11:37:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=8837309c2e69d1ce9c4629f3dd279496d50aae5e'/>
<id>urn:sha1:8837309c2e69d1ce9c4629f3dd279496d50aae5e</id>
<content type='text'>
This makes the keypad enter key emit "\eOM" in keypad application
mode.
</content>
</entry>
<entry>
<title>keymap: add escapes for keypad 'begin'</title>
<updated>2020-01-10T19:23:56Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-01-10T19:23:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=30f6480644ae8c841baed4a5bc1f7aeeacb220a7'/>
<id>urn:sha1:30f6480644ae8c841baed4a5bc1f7aeeacb220a7</id>
<content type='text'>
This is usually the '5' key, in non-num lock mode.
</content>
</entry>
<entry>
<title>keymap: add meta modifier mappings for keypad keys</title>
<updated>2019-08-15T18:07:33Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-08-15T18:07:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b8c552a5b78d9b08091706cb97bd2d38d43b3abe'/>
<id>urn:sha1:b8c552a5b78d9b08091706cb97bd2d38d43b3abe</id>
<content type='text'>
</content>
</entry>
</feed>
