<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/input.c, branch releases/1.17</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=releases%2F1.17</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=releases%2F1.17'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2024-04-11T13:12:45Z</updated>
<entry>
<title>config: add new key-binding 'quit', unbound by default</title>
<updated>2024-04-11T13:12:45Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-04-10T17:26:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b400903e25de321dffd310e30d76dad121ccceb1'/>
<id>urn:sha1:b400903e25de321dffd310e30d76dad121ccceb1</id>
<content type='text'>
Closes #1475
</content>
</entry>
<entry>
<title>kitty kbd: update handling of locked modifiers</title>
<updated>2024-03-06T15:33:24Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-03-02T07:16:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=702d3ae6ca8e232ba4df9f0ee4e0141e243b49cf'/>
<id>urn:sha1:702d3ae6ca8e232ba4df9f0ee4e0141e243b49cf</id>
<content type='text'>
The kitty keyboard specification has been updated/clarified yet
again. Locked modifiers are to be ignored if the key event would
result in plain text without the locked modifier being enabled.

In short, locked modifiers are included in the set of modifiers
reported in a key event. But having a locked modifier enabled doesn't
turn all key events into CSIu sequences.

For example, with only the disambiguate mode enabled, pressing 'a', or
'shift+a' results in a/A regardless of the state of Caps- or NumLock.

But 'ctrl+a', which always results in a CSIu, will have a different
modifier list, depending on whether Caps- or NumLock are enabled.
</content>
</entry>
<entry>
<title>kitty kbd: switch from GTK to XKB mode for 'consumed' modifiers</title>
<updated>2024-03-02T09:28:25Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-02-29T08:32:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ec73e4d10d1f3aa899000c1dd4c58f371c7b926f'/>
<id>urn:sha1:ec73e4d10d1f3aa899000c1dd4c58f371c7b926f</id>
<content type='text'>
This fixes an issue where some key combinations resulted in different
output (e.g. escape code vs. plain text) depending on the state of
e.g. the NumLock key. One such example is Shift+space. Another example
is Shift+BackSpace.

This patch also removes the hardcoded CapsLock filter, when
determining whether a key combo produces text or not, and instead uses
the locked modifiers as reported by XKB.
</content>
</entry>
<entry>
<title>input: don't clear text selection on modifier keypresses</title>
<updated>2024-02-22T21:23:40Z</updated>
<author>
<name>Tim Culverhouse</name>
<email>tim@timculverhouse.com</email>
</author>
<published>2024-02-22T21:08:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=749d36d32127ba146d42d8b13aa628432bc295ea'/>
<id>urn:sha1:749d36d32127ba146d42d8b13aa628432bc295ea</id>
<content type='text'>
When kitty keyboard is enabled, pressing a modifier key will clear the
text selection. This makes it difficult to copy text because the
selection clears as soon as the user presses "ctrl".

Tested-by: Robin Jarry &lt;robin@jarry.cc&gt;
Signed-off-by: Tim Culverhouse &lt;tim@timculverhouse.com&gt;
</content>
</entry>
<entry>
<title>input: improved debug logging of key press/release</title>
<updated>2024-02-20T15:18:55Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-02-20T15:18:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=09d856f2ff1f0002457bde6f5f8a469aadb56b4e'/>
<id>urn:sha1:09d856f2ff1f0002457bde6f5f8a469aadb56b4e</id>
<content type='text'>
* Log which it is: press or release
* Include locked modifiers
* Include human-readable names of the modifiers
</content>
</entry>
<entry>
<title>input: remove debug logging</title>
<updated>2024-02-06T13:04:59Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-02-06T13:04:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ebbee61f144e5f3f662d8b2421ab7429145a6637'/>
<id>urn:sha1:ebbee61f144e5f3f662d8b2421ab7429145a6637</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Don't use fancy Unicode quotes, stick to ASCII</title>
<updated>2024-02-06T11:36:45Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-02-06T11:36:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7999975016a57cc0a2c2e20bc55f29de32df7044'/>
<id>urn:sha1:7999975016a57cc0a2c2e20bc55f29de32df7044</id>
<content type='text'>
</content>
</entry>
<entry>
<title>config: add pipe-command-output key-binding</title>
<updated>2024-02-06T11:12:57Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-12-08T10:45:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1c70a84fde80405e0b6658722af8bc3fb54f225d'/>
<id>urn:sha1:1c70a84fde80405e0b6658722af8bc3fb54f225d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term: move row-&gt;prompt_marker into new struct, row-&gt;shell_integration</title>
<updated>2024-02-06T11:12:56Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-12-08T09:35:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=f8e875a7cddaac91818b98993d17a96d09a5b4a5'/>
<id>urn:sha1:f8e875a7cddaac91818b98993d17a96d09a5b4a5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: remove the concept of "significant" modifiers</title>
<updated>2024-02-06T10:08:42Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-02-06T09:41:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0aefc2c65de8cca39ddbf9d8c12f1a4d4206b42a'/>
<id>urn:sha1:0aefc2c65de8cca39ddbf9d8c12f1a4d4206b42a</id>
<content type='text'>
For the purpose of matching key bindings, "significant" modifiers are
no more.

We're really only interested in filtering out "locked"
modifiers. We're already doing this, so there's no need to *also*
match against a set of "significant" modifiers.

Furthermore, we *never* want to consider locked keys (e.g. when
emitting escapes to the client application), thus we can filter those
out already when retrieving the set of active modifiers.

The exception is the kitty keyboard protocol, which has support for
CapsLock and NumLock. Since we're already re-retrieving the "consumed"
modifiers (using the GTK style, rather than normal "XKB" style, to
better match the kitty terminal), we might as well re-retrieve the
effective modifiers as well.
</content>
</entry>
<entry>
<title>input/config: support *all* modifier names</title>
<updated>2024-02-06T10:05:20Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-05-06T09:39:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4730ff8d080e82fad0554dfcb957dfc82f6568b3'/>
<id>urn:sha1:4730ff8d080e82fad0554dfcb957dfc82f6568b3</id>
<content type='text'>
That is, allow custom modifiers (i.e. other than ctrl/shift/alt etc)
in key bindings.

This is done by no longer validating/translating modifier names to
booleans for a pre-configured set of modifiers (ctrl, shift, alt,
super).

Instead, we keep the modifier *names* in a list, in the key binding
struct.

When a keymap is loaded, and we "convert" the key binding, _then_ we
do modifier translation. For invalid modifier names, we print an
error, and then ignore it. I.e. we no longer fail to load a config due
to invalid modifier names.

We also need to update how we determine the set of significant
modifiers. Any modifier not in this list will be ignored when matching
key bindings.

Before this patch, we hardcoded this to shift/alt/ctrl/super. Now, to
handle custom modifiers as well, we simply treat *all* modifiers
defined by the current layout as significant.

Typically, the only unwanted modifiers are "locked" modifiers. We are
already filtering these out.
</content>
</entry>
<entry>
<title>util: add streq() function and use in place of strcmp(...) == 0</title>
<updated>2024-02-05T11:09:52Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2024-01-24T23:17:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e0f3703ae6c4084f9275cfc78d87e5604cc27a10'/>
<id>urn:sha1:e0f3703ae6c4084f9275cfc78d87e5604cc27a10</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: kitty: update to latest version of the spec</title>
<updated>2024-01-24T18:57:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-01-22T15:39:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4ee4f47065d7e1a77a18d3b029f94ccab8ddb3d3'/>
<id>urn:sha1:4ee4f47065d7e1a77a18d3b029f94ccab8ddb3d3</id>
<content type='text'>
Starting with kitty 0.32.0, the modifier bits during modifier key
events behave differently, compared to before. Or, rather, they have
now been spec:ed; before, behavior was different on e.g. MacOS, and
Linux.

The new behavior is this:

On key press, the modifier bits in the kitty key event *includes* the
pressed modifier key.

On key release, the modifier bits in the kitty key event does *not*
include the released modifier key.

In other words, The modifier bits reflects the state *after* the key
event.

This is the exact opposite of what foot did before this patch.

The patch is really pretty small: in order to include the key in the
modifier set, we simulate a key press to update the XKB state, using
xkb_state_uppate_key(). For key pressed, we simulate an XKB_KEY_DOWN
event, and for key releases we simulate an XKB_KEY_UP event.

Then we re-retrieve the modifers, both the full set, and the consumed
set.

Closes #1561
</content>
</entry>
<entry>
<title>selection: add support for selecting the contents of a quote</title>
<updated>2023-09-19T14:23:34Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-09-19T14:23:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1719ff93a75ad886ed53be468f7faa12f530e9f3'/>
<id>urn:sha1:1719ff93a75ad886ed53be468f7faa12f530e9f3</id>
<content type='text'>
This patch changes the default of triple clicking, from selecting the
current logical row, to first trying to select the contents of the
quote under the cursor, and if failing to find a quote, selecting the
current row (like before).

This is implemented by adding a new key binding, 'select-quote'.

It will search for surrounding quote characters, and if one is found
on each side of the cursor, the quote is selected. If not, the entire
row is selected instead.

Subsequent selection operations will behave as if the selection is
either a word selection (a quote was found), or a row selection (no
quote found).

Escaped quote characters are not supported: "foo \" bar" will match
'foo \', and not 'foo " bar'.

Mismatched quotes are not custom handled. They will simply not match.

Nested quotes ("123 'abc def' 456") are supported.

Closes #1364
</content>
</entry>
<entry>
<title>input: make wheel events mappable</title>
<updated>2023-09-18T14:36:39Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-09-18T14:36:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=fe7aa25ad82f5551f0a84bb98df8ccbac39a8f79'/>
<id>urn:sha1:fe7aa25ad82f5551f0a84bb98df8ccbac39a8f79</id>
<content type='text'>
Un-grabbed wheel events are now passed through the mouse binding
matching logic, instead of being hardcoded to scrolling the terminal
contents.

They are mappable through the BTN_BACK and BTN_FORWARD buttons.

Since they're not actually button *presses*, they never generate a
click count other than 1. This limitation is documented, but not
checked in the config. This means it's possible to create bindings
like "BTN_BACK+3" (i.e. triple "click"). They will however never
trigger.

The old, hardcoded logic is now accessible through the new
scrollback-up-mouse and scrollback-down-mouse mouse
bindings. They (obiously) default to BTN_BACK and BTN_FORWARD,
respectively.

Example usage: keep the default of scrolling terminal contents with
the wheel, when used without modifiers, but map Control+wheel to font
zoom in/out:

  [mouse-bindings]
  font-increase=Control+BTN_FORWARD
  font-decrease=Control+BTN_BACK

(this also keeps the default key bindings to zoom in/out; ctrl-+ and
ctrl+-)

Closes #1077
</content>
</entry>
<entry>
<title>input: improve touch handling on pointer presense</title>
<updated>2023-08-23T16:45:20Z</updated>
<author>
<name>CismonX</name>
<email>admin@cismon.net</email>
</author>
<published>2023-08-19T15:01:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=f0f0d02bf74b1ba4279b25883db7b48619242377'/>
<id>urn:sha1:f0f0d02bf74b1ba4279b25883db7b48619242377</id>
<content type='text'>
No longer inhibits touch event handling when terminal window
has pointer focus.  Instead, inhibit touch event when at least
one pointer button is held down.

This change improves user experience when using foot with both
a mouse and a touchscreen.

Closes #1428.
</content>
</entry>
<entry>
<title>input: do not ignore touch events on the CSDs</title>
<updated>2023-07-16T12:41:33Z</updated>
<author>
<name>CismonX</name>
<email>admin@cismon.net</email>
</author>
<published>2023-07-16T09:24:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=8b4cb2457aa5b90d265f59207b4b592ba6adebbc'/>
<id>urn:sha1:8b4cb2457aa5b90d265f59207b4b592ba6adebbc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>config: add csd.double-click-to-maximize=no|yes option</title>
<updated>2023-07-14T10:03:35Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-07-14T10:03:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=3f7be59062f00cd99d832eaa5d389b880a3c512e'/>
<id>urn:sha1:3f7be59062f00cd99d832eaa5d389b880a3c512e</id>
<content type='text'>
When enabled, double-clicking the CSD titlebar will (un)maximize the
window.

Defaults to ‘yes’ (since this is the old hard-coded behavior).

Closes #1293
</content>
</entry>
<entry>
<title>input: add basic support for touchscreen input</title>
<updated>2023-07-05T14:22:28Z</updated>
<author>
<name>CismonX</name>
<email>admin@cismon.net</email>
</author>
<published>2023-07-04T16:19:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d2fcb5343f57c132abec9a21ad89d1505a32c47c'/>
<id>urn:sha1:d2fcb5343f57c132abec9a21ad89d1505a32c47c</id>
<content type='text'>
Closes #517
</content>
</entry>
<entry>
<title>refactor: track current xcursor using an enum, instead of a char pointer</title>
<updated>2023-07-03T12:36:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-06-27T14:57:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ee794a121e4603d01fb662ad6d1f3b18b6937d2c'/>
<id>urn:sha1:ee794a121e4603d01fb662ad6d1f3b18b6937d2c</id>
<content type='text'>
</content>
</entry>
</feed>
