<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/input.h, branch 1.26.0</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.26.0</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.26.0'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2024-07-13T08:41:10Z</updated>
<entry>
<title>input: don't map wheel events to BTN_{BACK,FORWARD}</title>
<updated>2024-07-13T08:41:10Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-07-13T08:24:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1136108c9780eae9fae252a1bca5089f19fcd57d'/>
<id>urn:sha1:1136108c9780eae9fae252a1bca5089f19fcd57d</id>
<content type='text'>
BTN_BACK and BTN_FORWARD are separate buttons. The scroll wheel don't
have any button mappings in libinput/wayland, so make up our own
defines.

This allows us to map them in mouse bindings.

Also expose BTN_WHEEL_{LEFT,RIGHT}. These were already defined, and
used, internally, to handle wheel tilt events. With this, they can
also be used in mouse bindings.

Finally, fix encoding used for BTN_{BACK,FORWARD} when sending mouse
button events to the client application. Before this, they were mapped
to buttons 4/5. But, button 4/5 are for the scroll wheel, and as
mentioned above, BTN_{BACK,FORWARD} are not the same as scroll wheel
"buttons".

Closes #1763
</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>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: 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>
<entry>
<title>replace gettimeofday with clock_gettime</title>
<updated>2022-01-15T16:05:45Z</updated>
<author>
<name>Pranjal Kole</name>
<email>pranjal.kole7@gmail.com</email>
</author>
<published>2022-01-15T09:26:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0da19a81bc9a94f83bfcf8c5af0e3571f751cf38'/>
<id>urn:sha1:0da19a81bc9a94f83bfcf8c5af0e3571f751cf38</id>
<content type='text'>
POSIX.1-2008 has marked gettimeofday(2) as obsolete, recommending the
use of clock_gettime(2) instead.

CLOCK_MONOTONIC has been used instead of CLOCK_REALTIME because it is
unaffected by manual changes in the system clock. This makes it better
for our purposes, namely, measuring the difference between two points in
time.

tv_sec has been casted to long in most places since POSIX does not
define the actual type of time_t.
</content>
</entry>
<entry>
<title>config, input: allow configuring select-override modifiers</title>
<updated>2021-12-02T23:44:08Z</updated>
<author>
<name>feeptr@codeberg.org</name>
<email>feeptr</email>
</author>
<published>2021-09-27T19:09:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a4d53bdf88ea112d1d802a6a004a84732297f01b'/>
<id>urn:sha1:a4d53bdf88ea112d1d802a6a004a84732297f01b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>pgo: add stub for xcursor_for_csd_border()</title>
<updated>2021-11-30T21:43:41Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-30T21:43:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1752745fcfcce6ad0ad540e006a39640ef6fc432'/>
<id>urn:sha1:1752745fcfcce6ad0ad540e006a39640ef6fc432</id>
<content type='text'>
</content>
</entry>
<entry>
<title>terminal: Make seat xcursor update focus aware</title>
<updated>2021-11-29T15:26:40Z</updated>
<author>
<name>Jonas Ådahl</name>
<email>jadahl@gmail.com</email>
</author>
<published>2021-11-19T14:02:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5c2557b42116dd6d0f86c90b2cf04cd43f80a36e'/>
<id>urn:sha1:5c2557b42116dd6d0f86c90b2cf04cd43f80a36e</id>
<content type='text'>
When term_xcursor_update_for_seat() was called on e.g. keyboard focus
loss, it'd update the curret xcursor to 'text' even if it was e.g. on
top of the window title, or resize areas. This makes the function a bit
more focus aware, and will not be so eager to set the text xcursor.
</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>config: key/mouse bindings: refactor: less parsing in keyboard_enter()</title>
<updated>2020-08-13T16:47:19Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-08-10T17:00:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b97ef5819f806fe401a4b655bd06479a0394ea9d'/>
<id>urn:sha1:b97ef5819f806fe401a4b655bd06479a0394ea9d</id>
<content type='text'>
This simplifies the handling of mouse and keyboard bindings.

Before, the bindings where parsed *both* when loading the
configuration, and then on every keyboard enter event. This was done
since keys require a keymap to be decoded. Something we don't have at
configuration time. The idea was that at config time, we used a
default keymap just to verify the key combo strings were valid.

The following has changed:

* The bindings in the config struct is now *one* key combo per
  entry. Previously, it was one *action* per entry, and each entry
  had one or more key combos.

  Doing it this way makes it easier when converting the binding in the
  keyboard enter event (which previously had to expand the combos
  anyway).

* The bindings in the config struct no longer contains any unparsed
  strings.

  A key binding contains a decoded 'modifier' struct (which specifies
  whether e.g. ctrl, or shift, or ctrl+shift must be pressed for the
  binding to be used).

  It also contains a decoded XKB keysym.

* A mouse binding in the config struct is similar to a key binding,
  except it contains the button, and click count instead of the XKB
  key sym.

* The modifiers in the user-specified key combo is decoded at config
  time, by using the pre-defined XKB constants
  XKB_MOD_NAME_&lt;modifier&gt;.

  The result is stored in a 'modifiers' struct, which is just a
  collection of booleans; one for each supported modifier.

  The supported modifiers are: shift, ctrl, alt and meta/super.

* The key sym is decoded at config time using
  xkb_keysym_from_name(). This call does *not* depend on a keymap.

* The mouse button is decoded at config time using a hardcoded mapping
  table (just like before).

* The click count is currently hard-coded to 1.

* In the keyboard enter event, all we need to do is pre-compute the
  xkb_mod_mask_t variable for each key/mouse binding, and find all the
  *key codes* that map to the (already decoded) symbol.

  For mouse bindings, the modifiers are the *only* reason we convert
  the mouse bindings at all.

  In fact, on button events, we check if the seat has a keyboard. If
  not, we use the mouse bindings from the configuration directly, and
  simply filter out those with a non-empty set of modifiers.
</content>
</entry>
<entry>
<title>config: wip: add support for modifiers in mouse bindings</title>
<updated>2020-08-13T16:47:19Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-08-09T20:40:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=544c1b1976544085a2f27497c5c516bf1d9edfa3'/>
<id>urn:sha1:544c1b1976544085a2f27497c5c516bf1d9edfa3</id>
<content type='text'>
Mouse bindings can now include modifiers. They are specified in pretty
much the same way as in keyboard bindings:

  Control+BTN_LEFT
</content>
</entry>
<entry>
<title>wip: multi-seat support</title>
<updated>2020-07-08T14:45:26Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-08T14:45:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c47082506714f458e999f6ff1bf3099dfc4c0c0c'/>
<id>urn:sha1:c47082506714f458e999f6ff1bf3099dfc4c0c0c</id>
<content type='text'>
Compiles and runs, but mouse, clipboard and other things have been
disabled.
</content>
</entry>
<entry>
<title>search: replace hard-coded key bindings with "user configurable" ones</title>
<updated>2020-03-18T14:30:14Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-03-18T14:30:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=04191564946d3ba6c1c49e5041e4bd0cda819043'/>
<id>urn:sha1:04191564946d3ba6c1c49e5041e4bd0cda819043</id>
<content type='text'>
They aren't really user configurable. At least not yet.

However, with this, we now handle raw key codes just like the normal
key bindings. Meaning, e.g. ctrl+g, ctrl+a, ctrl+e etc now works while
searching with e.g. a russian layout.
</content>
</entry>
<entry>
<title>input: parse_key_binding_for_action: export function</title>
<updated>2020-03-09T18:47:22Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-03-09T18:47:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0c72128405919263127f2771de8a7a8561961219'/>
<id>urn:sha1:0c72128405919263127f2771de8a7a8561961219</id>
<content type='text'>
</content>
</entry>
<entry>
<title>search: add support for user configurable key bindings</title>
<updated>2020-03-08T14:28:47Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-03-08T14:28:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0d188895c3e88f591aa47f7a5c272ad959e5a40d'/>
<id>urn:sha1:0d188895c3e88f591aa47f7a5c272ad959e5a40d</id>
<content type='text'>
No default bindings defined yet, though.
</content>
</entry>
<entry>
<title>input: input_repeat() takes a 'struct wayland' pointer</title>
<updated>2019-10-27T17:44:58Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-10-27T17:44:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=8c534d0520fd2fa2a505a86c8f2ec6e290e079f7'/>
<id>urn:sha1:8c534d0520fd2fa2a505a86c8f2ec6e290e079f7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: mouse events</title>
<updated>2019-07-05T08:44:57Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-07-05T08:44:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a102ff09f97135e911809eb7d4ef97870b287f5a'/>
<id>urn:sha1:a102ff09f97135e911809eb7d4ef97870b287f5a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>wip: initial input handling</title>
<updated>2019-06-19T08:04:47Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2019-06-19T08:04:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=71dde121e63177b0fc1bc2d6897e63e533d666fc'/>
<id>urn:sha1:71dde121e63177b0fc1bc2d6897e63e533d666fc</id>
<content type='text'>
</content>
</entry>
</feed>
