<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/input.c, branch releases/1.21</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=releases%2F1.21</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=releases%2F1.21'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2025-03-11T07:42:03Z</updated>
<entry>
<title>input: kitty: unittest: don't fail if system has no compose tables</title>
<updated>2025-03-11T07:42:03Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-03-11T07:42:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=cfa178ab259528a106a2855bdd2e07c34a822224'/>
<id>urn:sha1:cfa178ab259528a106a2855bdd2e07c34a822224</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: kitty: send release events for composed keys</title>
<updated>2025-03-11T07:36:37Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-03-11T07:36:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7976975a8a6382a1e81a5d6c2749bc5beb23ff41'/>
<id>urn:sha1:7976975a8a6382a1e81a5d6c2749bc5beb23ff41</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: kitty: regression test for #1987</title>
<updated>2025-03-11T07:23:23Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-03-11T07:23:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=04fcc5f5b5d0a3f45d752e987a0c87baa4e50779'/>
<id>urn:sha1:04fcc5f5b5d0a3f45d752e987a0c87baa4e50779</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: kitty: always use shifted key when it's the result of a compose</title>
<updated>2025-03-10T14:47:20Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-03-10T14:47:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=8d2627b1ef8fd7f8313e4441de3c76b873575a8e'/>
<id>urn:sha1:8d2627b1ef8fd7f8313e4441de3c76b873575a8e</id>
<content type='text'>
Closes #1987
</content>
</entry>
<entry>
<title>config+url: add support for user-defined regex patterns</title>
<updated>2025-02-05T12:35:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-02-03T07:55:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=051cd6ecfc8b98e1d80b399ebea40207fe040750'/>
<id>urn:sha1:051cd6ecfc8b98e1d80b399ebea40207fe040750</id>
<content type='text'>
Users can now define their own regex patterns, and use them via key
bindings:

    [regex:foo]
    regex=foo(bar)?
    launch=path-to-script-or-application {match}

    [key-bindings]
    regex-launch=[foo] Control+Shift+q
    regex-copy=[foo] Control+Mod1+Shift+q

That is, add a section called 'regex:', followed by an
identifier. Define a regex and a launcher command line.

Add a key-binding, regex-launch and/or regex-copy (similar to
show-urls-launch and show-urls-copy), and connect them to the regex
with the "[regex-name]" syntax (similar to how the pipe-* bindings
work).
</content>
</entry>
<entry>
<title>input: match unshifted key-bindings before shifted</title>
<updated>2025-01-31T08:07:42Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-31T08:07:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=51128a3484049e5f9b9b74276222977d12554d76'/>
<id>urn:sha1:51128a3484049e5f9b9b74276222977d12554d76</id>
<content type='text'>
That is, try to match e.g. Control+shift+a, before trying to match
Control+A.

In most cases, order doesn't matter. There are however a couple of
symbols where the layout consumes the shift-modifier, and the
generated symbol is the same in both the shifted and unshifted
form. One such example is backspace.

Before this patch, key-bindings with shift-backspace would be ignored,
if there were another key-binding with backspace.

So, for example, if we had one key-binding with Control+Backspace, and
another with Control+Shift+Backspace, the latter would never trigger,
as we would always match the first one.

By checking for unshifted matches first, we ensure
Control+Shift+Backspace does match.
</content>
</entry>
<entry>
<title>input: ignore key-bindings without modifiers when matching untranslated/raw</title>
<updated>2025-01-31T06:35:54Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-31T06:35:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=bee17a95b86a640522c25e650e13aebc82c7353d'/>
<id>urn:sha1:bee17a95b86a640522c25e650e13aebc82c7353d</id>
<content type='text'>
When matching the unshifted symbol, or the raw key code, ignore all
key bindings that don't have any modifiers.

This fixes an issue where it was impossible to enter (some of the)
numbers on the keypad, **if** there was a key-binding for
e.g. KP_Page_Up, or KP_Page_Down.
</content>
</entry>
<entry>
<title>input: close fd on no/unrecognized keymap format</title>
<updated>2025-01-30T10:58:19Z</updated>
<author>
<name>Attila Fidan</name>
<email>dev@print0.net</email>
</author>
<published>2025-01-30T09:39:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5286808b6cd439c0442a76169d7a58b1b7e71e8c'/>
<id>urn:sha1:5286808b6cd439c0442a76169d7a58b1b7e71e8c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>key-bindings: try all bindings in translated mode before matching untranslated, and then finally raw</title>
<updated>2025-01-27T11:31:40Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-27T09:51:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=8d6f0d0583a1cb7c245ff54ec472a03ebcdb6949'/>
<id>urn:sha1:8d6f0d0583a1cb7c245ff54ec472a03ebcdb6949</id>
<content type='text'>
When trying to match key bindings, we do three types of matching:

* Match the _translated_ symbol (e.g. Control+C)
* Match the _untranslated_ symbol (e.g. Control+Shift+c)
* Match raw keyboard codes

This was done for *each* key binding. This meant we sometimes matched
a keybinding in raw mode, even though there was a
translated/untranslated binding that would match it too. All depending
on the internal order of the key binding list.

This patch changes it, so that we first try all bindings in translated
mode, then all bindings in untranslated mode, and finally all bindings
in raw mode.

Closes #1929
</content>
</entry>
<entry>
<title>input: kitty: refactor, try to simplify and be less confusing</title>
<updated>2025-01-22T11:37:36Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-22T11:37:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ba7ecc4669ab0bef850318478cf739016a2fc6a9'/>
<id>urn:sha1:ba7ecc4669ab0bef850318478cf739016a2fc6a9</id>
<content type='text'>
Use better named variables while juggling the shifted vs. unshifted
key codes.

Switch to variable names appropriate for the kitty keyboard protocol
once we have all the unshifted, shifted and base key codes done. It's
not until then we can decide which key code to use as the main key,
and whether or not to report the alternate key code.
</content>
</entry>
<entry>
<title>input: kitty: add more test cases</title>
<updated>2025-01-22T11:24:06Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-22T11:24:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=f301f6ecccc4a6be70da793c56814e50d13e93db'/>
<id>urn:sha1:f301f6ecccc4a6be70da793c56814e50d13e93db</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: kitty: only set 'alternate' if the "unshifted" code is printable</title>
<updated>2025-01-22T09:26:44Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-22T09:26:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=6ca1a2c2dcdcbd3432a953e19f55829b6f07e7f0'/>
<id>urn:sha1:6ca1a2c2dcdcbd3432a953e19f55829b6f07e7f0</id>
<content type='text'>
Fixes a regression where alt+backspace was reported as ^[[8:127;3u
instead of ^[[127;3u.
</content>
</entry>
<entry>
<title>input: codespell: indiciates -&gt; indicates</title>
<updated>2025-01-22T07:04:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-22T06:51:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=f62a5ed1ff139b70d6c12ee3033cc956c3d93723'/>
<id>urn:sha1:f62a5ed1ff139b70d6c12ee3033cc956c3d93723</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: kitty: add initial unit test</title>
<updated>2025-01-22T07:04:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-21T07:37:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=09f718878f8afa54cb38d046db0af12e1ff679a2'/>
<id>urn:sha1:09f718878f8afa54cb38d046db0af12e1ff679a2</id>
<content type='text'>
Test a couple of key combos from the se and de(neo) layouts.

This unit test isn't intended to test _all_ key combinations, for all
kitty flag combinations, but to be more of a regression test -
whenever we discover a buggy, weird combo, add it here.
</content>
</entry>
<entry>
<title>input: kitty: improve handling of alternate+base keys even more</title>
<updated>2025-01-20T09:34:45Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-20T09:34:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=786037791c2e775c98287d794277b6ef0752aab4'/>
<id>urn:sha1:786037791c2e775c98287d794277b6ef0752aab4</id>
<content type='text'>
* Always do a base key lookup. Before this, we didn't do that if we
  matched the XKB sym to a lookup table entry (i.e. keypads, cursor keys
  etc.)
* Try to retrieve the unshifted symbol also when we matched the symbol
  to a lookup table entry. When successful, we now report an alternate
  key for keypad and cursor keys; before this patch, we only did that
  for keys that didn't have an entry in the lookup table (i.e. ASCII
  chars etc).

This improves compatibility with kitty (and the kitty keyboard
protocol) in more corner cases. One particular example is the neo
keyboard layout, where part of the regular keys act as keypad keys
when num-lock is active.
</content>
</entry>
<entry>
<title>input: kitty: fix alternate codepoint sometimes not being reported</title>
<updated>2025-01-20T08:08:47Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-20T08:08:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2ff38e86a7fabd8fd90caa31c7eb0aea76fc981b'/>
<id>urn:sha1:2ff38e86a7fabd8fd90caa31c7eb0aea76fc981b</id>
<content type='text'>
When alternate key reporting is enabled (i.e. when we're supposed to
report the shifted key along with the unshifted key), we try to figure
out whether the key really is shifted or not (and thus which xkb
keysym to use for the unshifted and shifted keys in the escape).

This was done by getting the layout's *all* modifier combinations that
produce the shifted keysym, and if any of of them contained a modifier
that isn't supported by the kitty protocol, the shifted and unshifted
keys are derived from the same keysym. This is to ensure we handle
things like AltGr-combos correctly.

The issue is, since there may be more than one modifier combination
generating the shifted keysym, we may end up using the wrong keysym
just because _another_ combination set contains modifiers not
supported by the kitty protocol. What we're interrested in is whether
the *pressed* set of modifiers contains such modifiers.

Closes #1918
</content>
</entry>
<entry>
<title>kitty kbd: don't generate release events for plain Enter+Tab+Backspace</title>
<updated>2025-01-01T07:06:52Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-01T07:06:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e851d44ac949df533a31b7e40a6ab5752dac79f5'/>
<id>urn:sha1:e851d44ac949df533a31b7e40a6ab5752dac79f5</id>
<content type='text'>
From the specification:

    The Enter, Tab and Backspace keys will not have release events
    unless Report all keys as escape codes is also set, so that the
    user can still type reset at a shell prompt when a program that
    sets this mode ends without resetting it.

Closes #1892
</content>
</entry>
<entry>
<title>csd: track pointer when rendering and handling CSD button clicks</title>
<updated>2024-08-09T06:20:59Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-08-09T06:20:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=bef613e656a36400577cde295b09267c80f3adce'/>
<id>urn:sha1:bef613e656a36400577cde295b09267c80f3adce</id>
<content type='text'>
* Render button as highlighted only when pointer is above them
* Releasing the mouse button while *not* on the button does *not*
  activate the button

When pressing, and holding, a mouse button, the compositor keeps
sending motion events for the surface where the button was pressed,
even if the mouse has moved outside it.

We also don't get any surface leave/enter events.

This meant that the button was rendered as highlighted, and a click
registered, if the user pressed the mouse button while on the button,
and then moved the cursor away from the button before releasing the
button.

This patch fixes it, by checking if the current cursor coordinates
fall within the button surface.
</content>
</entry>
<entry>
<title>input: CSD buttons are now triggered when releasing the mouse button</title>
<updated>2024-08-09T06:20:36Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-08-02T15:12:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7ec9ca2b9528126bf11dda37cfea9687b6bc66a3'/>
<id>urn:sha1:7ec9ca2b9528126bf11dda37cfea9687b6bc66a3</id>
<content type='text'>
This is how most UIs work.

Note that we (at least on River) don't get any surface enter/leave
events while a button is held. This means we can't detect if the user
pressed the mouse button while on a CSD button, but then moves the
mouse outside. Releasing the mouse button will still activate the CSD
button.

Closes #1787
</content>
</entry>
<entry>
<title>spawn: add optional reaper callback, return pid_t</title>
<updated>2024-07-23T05:17:21Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-07-23T04:57:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a42f99081876dd02e28b931f7c0e70230355bb58'/>
<id>urn:sha1:a42f99081876dd02e28b931f7c0e70230355bb58</id>
<content type='text'>
This will allow spawn() callers to do things when the spawned process
has terminated.
</content>
</entry>
</feed>
