<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/input.c, branch 1.10.0</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.10.0</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.10.0'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2021-11-13T10:09:07Z</updated>
<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>input: don’t apply [scrollback].multiplier when alt screen is in use</title>
<updated>2021-11-13T10:05:36Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-08T17:41:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ebcf5a4b4f809e48ef26c13e7b525af8d246bbfd'/>
<id>urn:sha1:ebcf5a4b4f809e48ef26c13e7b525af8d246bbfd</id>
<content type='text'>
Closes #787
</content>
</entry>
<entry>
<title>input: clean up mouse scroll handling</title>
<updated>2021-10-27T15:09:26Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-10-25T17:39:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0900d01ec9fce2e64384ef27111fe1a4d9d45068'/>
<id>urn:sha1:0900d01ec9fce2e64384ef27111fe1a4d9d45068</id>
<content type='text'>
* Allow scrolling on the normal (non-alt) screen, when application is
  grabbing the mouse (when user presses Shift).
* Use term_mouse_grabbed() instead of explicitly checking for
  MOUSE_NONE tracking.
* Remove mouse tracking check from cmd_scrollback_{up,down}. Caller is
  expected to have done the check.
* Don’t scroll down on mouse wheel tilt events.
</content>
</entry>
<entry>
<title>config: add [key-bindings].noop action</title>
<updated>2021-10-27T15:07:26Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-10-24T09:49:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=bcea929c94cc8f8da8f29e52c17b09824a252318'/>
<id>urn:sha1:bcea929c94cc8f8da8f29e52c17b09824a252318</id>
<content type='text'>
Key combinations assigned to this action will not be sent to the
application.

Closes #765
</content>
</entry>
<entry>
<title>input: update serial on each key press/release and mouse button</title>
<updated>2021-10-20T17:59:57Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-10-20T16:47:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=8691ad8b2ed8f2b8cecf3b1d3ef1421c735c2389'/>
<id>urn:sha1:8691ad8b2ed8f2b8cecf3b1d3ef1421c735c2389</id>
<content type='text'>
The serial is used when copying/pasting data from the clipboard. Up
until now, we’ve used the serial from the keyboard/mouse enter
events.

This works in most cases, but breaks in the following example:

  $ wl-copy  WLCOPY
  /* Ctrl+Shift+v works fine (pastes "WLCOPY") */

  $ printf "\033]52;c;eHl6\a"
  /* Ctrl+Shift+v pastes "WLCOPY" instead of "xyz" */

Shifting focus away and then back to the foot window, and re-executing
the printf works, suggesting the “enter” serial is no longer valid
after another process(?) has copied something to the clipboard.

Updating the serial on key press/release (and the corresponding mouse
serial on mouse button events) seems to fix this.

I’ve also tested that “normal” copy/paste operations, within the same
foot instance, and between foot and other applications, are still
working. In at least river (wlroots based), and GNOME/mutter.

Closes #753
</content>
</entry>
<entry>
<title>input: filter out non-significant modifiers when matching mouse bindings</title>
<updated>2021-10-06T18:12:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-10-06T18:12:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=dbc01459e7c0a70a69e5e7c6be884048a48179c5'/>
<id>urn:sha1:dbc01459e7c0a70a69e5e7c6be884048a48179c5</id>
<content type='text'>
Closes #736
</content>
</entry>
<entry>
<title>input: check for ‘effective’ modifiers, not ‘depressed’</title>
<updated>2021-10-02T15:33:01Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-10-02T15:33:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=8e4d020a41727179078fae10d254a01161963aaa'/>
<id>urn:sha1:8e4d020a41727179078fae10d254a01161963aaa</id>
<content type='text'>
When reading XKB modifier state, use XKB_STATE_MODS_EFFECTIVE, not
XKB_STATE_MODS_DEPRESSED.

This fixes handling of ‘sticky’ modifier keys.
</content>
</entry>
<entry>
<title>input: workaround GNOME issue with pointer button events</title>
<updated>2021-09-12T08:32:22Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-09-06T16:12:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e553e1076c78fe99a7ea1faa5f2fd28a4f529d10'/>
<id>urn:sha1:e553e1076c78fe99a7ea1faa5f2fd28a4f529d10</id>
<content type='text'>
Under certain circumstances, GNOME will send multiple pointer button
press events, without any release or leave events in between.

This trips up our button tracking.

Workaround, by replacing the existing state for the pressed button
with the new state.

Previously, debug builds would assert (and thus crash), while release
builds would have multiple states for the same button,
causing (probably) issues like the title bar not being usable (as in,
cannot be dragged, buttons not working etc).

Hopefully closes #709
</content>
</entry>
<entry>
<title>input: implement support for mouse wheel left/right</title>
<updated>2021-08-07T10:27:44Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-08-05T16:34:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c2cc964116f9fc6c6432c5c00b113c92bdfcdcd6'/>
<id>urn:sha1:c2cc964116f9fc6c6432c5c00b113c92bdfcdcd6</id>
<content type='text'>
We now emit button 6/7 events (when the client application grabs the
mouse). This buttons map to mouse wheel horizontal scroll events. Or, left/right
tilting, if you like.

Wayland report these as ‘axis’ events (just like regular scroll wheel events),
and thus we need to translate those scroll events to button events.

libinput does not define any mouse buttons for wheel tilts, so we add our own
defitions. These are added last in the BTN_* range, just before the BTN_JOYSTICK
events.
</content>
</entry>
<entry>
<title>input: codespell: follwing -&gt; following</title>
<updated>2021-08-06T21:08:09Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-08-06T21:08:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=460e3b5c579fa06d695f62c081cbb4c0491c5423'/>
<id>urn:sha1:460e3b5c579fa06d695f62c081cbb4c0491c5423</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: workaround GNOME messing up pointer leave/enter after moving window</title>
<updated>2021-08-06T20:35:29Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-08-04T15:27:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a21bf1b4d98c97fd8f408241fcbc35079e812c82'/>
<id>urn:sha1:a21bf1b4d98c97fd8f408241fcbc35079e812c82</id>
<content type='text'>
GNOME doesn’t send pointer enter after finishing a window move.

In subsequent move operations, it is also possible to make it skip sending
pointer leave when starting the move operations.

This caused foot to assert in debug builds, and add the same button multiple
times to the list of buttons currently being pressed.
</content>
</entry>
<entry>
<title>term: consolidate shutdown related state into an anonymous struct</title>
<updated>2021-07-31T17:08:51Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-07-31T17:08:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=03f952cf4dcf45d909ce209838a3beb4304358e5'/>
<id>urn:sha1:03f952cf4dcf45d909ce209838a3beb4304358e5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>config: remove replaced/removed key bindings, instead of marking as ‘unused’</title>
<updated>2021-06-30T16:05:07Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-29T16:08:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=149c52bd4496eb4dd13eaa53bec690c60499502a'/>
<id>urn:sha1:149c52bd4496eb4dd13eaa53bec690c60499502a</id>
<content type='text'>
Instead of keeping removed/replaced key bindings in the key binding
array (marked as ‘unused’), remove them, by compacting the array.

The invariant is thus that there should be *no* entries in the key
binding list with the `BIND_ACTION_NONE` for action.

Add code to debug builds that verifies this, plus a unit test.

Closes #614
</content>
</entry>
<entry>
<title>input: ignore ‘unused’ URL key bindings when mapping bindings to current keymap</title>
<updated>2021-06-28T20:34:52Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-28T20:34:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a09f92817541c5935fda51f11004b7baae06f2ca'/>
<id>urn:sha1:a09f92817541c5935fda51f11004b7baae06f2ca</id>
<content type='text'>
This is a temporary fix for #614. Long term fix is to remove the
‘replaced’ bindings from the array at config time.
</content>
</entry>
<entry>
<title>config: add new function config_clone()</title>
<updated>2021-06-23T08:39:14Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-18T14:18:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=f7860aec7610be897155046bd730ad0b406bd56c'/>
<id>urn:sha1:f7860aec7610be897155046bd730ad0b406bd56c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>config: don’t use tllist where it isn’t necessary</title>
<updated>2021-06-18T13:35:57Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-17T16:15:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=495c7304878bdd010dc5d25620dc68f41ac4cd36'/>
<id>urn:sha1:495c7304878bdd010dc5d25620dc68f41ac4cd36</id>
<content type='text'>
tllists are great when dealing with dynamically changing lists. They
are also very easy to use when building lists/arrays where the final
size is unknown.

However, this ease of use comes at a price: code size. tll-macros
expand to a lot of code.

Since things in the config are static, once the config has been
loaded, using tllists for configuration data structures doesn’t make
much sense.

This patch replaces nearly all tllists used by the configuration, with
dynamically allocated arrays.
</content>
</entry>
<entry>
<title>input: pass through scrollback-* key bindings when alt screen is activw</title>
<updated>2021-06-04T21:25:45Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-04T21:25:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a7e2e4bfa92ab26fab129f0945ef71875c2a1213'/>
<id>urn:sha1:a7e2e4bfa92ab26fab129f0945ef71875c2a1213</id>
<content type='text'>
Since the alt screen have no scrollback, all scrollback-* actions are
effectively no-ops when the alt screen is active.

Make them available to the client application instead.

Closes #573
</content>
</entry>
<entry>
<title>macros: add UNITTEST macro and use to replace test_keymap_lookup()</title>
<updated>2021-05-26T07:13:58Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2021-05-25T17:38:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=3d9302b6f95e3bb0f00695faf8c575440c685840'/>
<id>urn:sha1:3d9302b6f95e3bb0f00695faf8c575440c685840</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: regression test for escape sequence generated for ctrl+shift+tab</title>
<updated>2021-05-26T07:13:58Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-05-25T15:57:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=360946917cec381860cdc459e1aa4587bd4a4fb8'/>
<id>urn:sha1:360946917cec381860cdc459e1aa4587bd4a4fb8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: keymap_lookup: remove unused argument ‘seat’</title>
<updated>2021-05-26T07:13:58Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-05-25T15:57:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=51f7599e9127069750bd540f05f160ea1bf50f1c'/>
<id>urn:sha1:51f7599e9127069750bd540f05f160ea1bf50f1c</id>
<content type='text'>
</content>
</entry>
</feed>
