<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/input.h, branch 1.7.0</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.7.0</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.7.0'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2020-08-13T16:47:19Z</updated>
<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>
