<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/input.c, branch releases/1.25</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=releases%2F1.25</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=releases%2F1.25'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2025-08-30T06:18:31Z</updated>
<entry>
<title>input: unit test: check pipe2() return value</title>
<updated>2025-08-30T06:18:31Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-08-30T06:18:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=f0e36e35cb65bdb92dbe24d00a9cc6bc8d72a458'/>
<id>urn:sha1:f0e36e35cb65bdb92dbe24d00a9cc6bc8d72a458</id>
<content type='text'>
Fixes compilation failures with clang, in release mode.
</content>
</entry>
<entry>
<title>term+input: refactor: move theme switching into term_theme_* functions</title>
<updated>2025-06-10T05:11:45Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-06-09T05:37:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=33eefa7b45c2d20750f5788dfdcc1008cf33ca47'/>
<id>urn:sha1:33eefa7b45c2d20750f5788dfdcc1008cf33ca47</id>
<content type='text'>
</content>
</entry>
<entry>
<title>libxkbcommon: don't require 1.8.0</title>
<updated>2025-05-18T09:36:57Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-05-18T09:35:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=3e1e3ea38ce8ed43ee61ddb584298f45dd72f1d5'/>
<id>urn:sha1:3e1e3ea38ce8ed43ee61ddb584298f45dd72f1d5</id>
<content type='text'>
The version bump was done since we now use XKB_VMOD_NAME_*; macros
added in libxkbcommon 1.8.0.

Not all distros have updated libxkbcommon yet (read: Debian). Since
it's fairly easy to work around, let's do that.

Closes #2103
</content>
</entry>
<entry>
<title>csi: implement private mode 2031 (dark/light mode detection)</title>
<updated>2025-04-26T12:23:34Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-04-20T10:48:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=10e7f291498a6600cfecc3cde604ea51de5f0f5a'/>
<id>urn:sha1:10e7f291498a6600cfecc3cde604ea51de5f0f5a</id>
<content type='text'>
* Recognize 'CSI ? 996 n', and respond with
  - 'CSI ? 997 ; 1 n' if the primary theme is active
  - 'CSI ? 997 ; 2 n' if the alternative theme is actice
* Implement private mode 2031, where changing the color
  theme (currently only possible via key bindings) causes the terminal
  to send the same CSI sequences as above.

In this context, foot's primary theme is considered dark, and the
alternative theme light (since the default theme is dark).

Closes #2025
</content>
</entry>
<entry>
<title>key-bindings: add bindings to switch between color themes</title>
<updated>2025-04-26T12:20:58Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-04-20T05:58:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=6bc91b5e288ef16613a4e6f9d0a9f6077cedc267'/>
<id>urn:sha1:6bc91b5e288ef16613a4e6f9d0a9f6077cedc267</id>
<content type='text'>
* color-theme-switch-1: select the primary color theme
* color-theme-switch-2: select the alternative color theme
* color-theme-toggle: toggle between the primary and alternative color themes
</content>
</entry>
<entry>
<title>input: reset modifiers in keyboard_leave()</title>
<updated>2025-04-19T11:36:13Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-04-19T06:05:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ef4a680ae813b23e7b9d1b6dd67413dcad377655'/>
<id>urn:sha1:ef4a680ae813b23e7b9d1b6dd67413dcad377655</id>
<content type='text'>
Closes #2034
</content>
</entry>
<entry>
<title>wayland+input: add support for toplevel edge constraints</title>
<updated>2025-04-07T11:41:37Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-04-07T11:32:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=23431e3ecfb59f71627b332852b906dc3d0bfad7'/>
<id>urn:sha1:23431e3ecfb59f71627b332852b906dc3d0bfad7</id>
<content type='text'>
Edge constraints are new (not yet available in a wayland-protocols
release) toplevel states, acting as a complement to the existing tiled
states.

Tiled tells us we shouldn't draw shadows etc *outside our window
geometry*.

Constrained tells us the window cannot be resized in the constrained
direction.

This patch does a couple of things:

* Recognize the new states when debug logging

* Change is_top_left() etc to look at the new constrained state
  instead of the tiled state. These functions are used when both
  choosing cursor shape, and when determining if/how to resize a
  window on a CSD edge click-and-drag.

* Update cursor shape selection to use the default (left_ptr) shape
  when on a constrained edge (or corner).

* Update CSD resize triggering, to not trigger a resize when attempted
  on a constrained edge (or corner).

See
https://gitlab.freedesktop.org/wayland/wayland-protocols/-/commit/86750c99ed062c306e837f11bb9492df572ad677:

    An edge constraint is an complementery state to the tiled state,
    meaning that it's not only tiled, but constrained in a way that it
    can't resize in that direction.

    This typically means that the constrained edge is tiled against a
    monitor edge. An example configuration is two windows tiled next
    to each other on a single monitor. Together they cover the whole
    work area.

    The left window would have the following tiled and edge constraint
    state:

        [ tiled_top, tiled_right, tiled_bottom, tiled_left,
          constrained_top, constrained_bottom, constrained_left ]

    while the right window would have the following:

        [ tiled_top, tiled_right, tiled_bottom, tiled_left,
          constrained_top, constrained_bottom, constrained_right ]

    This aims to replace and deprecate the
    `gtk_surface1.configure_edges` event and the
    `gtk_surface1.edge_constraint` enum.
</content>
</entry>
<entry>
<title>input: xkb: ignore virtual modifiers</title>
<updated>2025-03-31T06:08:43Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-03-29T09:34:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=58910856c8a86095883625009a089cef464edc44'/>
<id>urn:sha1:58910856c8a86095883625009a089cef464edc44</id>
<content type='text'>
Some compositors (mutter/GNOME is one) adds _virtual_ modifiers to the
set of active modifiers when e.g. Alt, Meta, Super or Hyper is
pressed. For example, pressing Alt+b would result in *both* the Alt
*and* the Mod1 modifier being set.

Since foot makes close to zero assumptions on how the modifiers should
be interpreted, this causes various breakages.

For example, a foot shortcut defined as Mod1+b will not match, since
the Alt modifiers is also set. This has forced users to
redefine/override some of the default key bindings to include the
additional modifiers.

It also causes issues with the kitty keyboard protocol, for some key
combinations. Mainly whether or not to use unshifted key or not,
resulting in incorrect escape sequences.

Since all the "real" modifiers are always set as well, we can safely
ignore the virtual modifiers.

Closes #2009
</content>
</entry>
<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>
</feed>
