<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/input.c, branch 1.5.0</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.5.0</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.5.0'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2020-09-15T16:57:00Z</updated>
<entry>
<title>input: mouse_scroll(): refactor</title>
<updated>2020-09-15T16:57:00Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-09-15T16:56:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=04c1bab7b0d24028403667d9081ca0081c947ebd'/>
<id>urn:sha1:04c1bab7b0d24028403667d9081ca0081c947ebd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: don’t use stale keycodes for arrow-up/down</title>
<updated>2020-09-15T16:44:54Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-09-15T16:44:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=cb41db85965698dcf34217f8d26d9163a72a2e70'/>
<id>urn:sha1:cb41db85965698dcf34217f8d26d9163a72a2e70</id>
<content type='text'>
The keycodes will change if the seat’s keymap changes. Make sure we
only do alternate scrolling if the seat has a keyboard, and use
the *current* layout’s keycodes for arrow up/down (instead of
the *first* layout’s).
</content>
</entry>
<entry>
<title>input: don’t do alternate mode scrolling if application is grabbing mouse</title>
<updated>2020-09-15T16:40:51Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-09-15T16:40:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=028bbd03a3284d60db802631a71ebb1626befa68'/>
<id>urn:sha1:028bbd03a3284d60db802631a71ebb1626befa68</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: don’t do grid scrollback if mouse events are being captured</title>
<updated>2020-09-15T16:33:58Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-09-15T16:33:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=6ad90e63236408d4b661050a96d2486854c69cb1'/>
<id>urn:sha1:6ad90e63236408d4b661050a96d2486854c69cb1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>key-binding: deprecate scrollback-up/down, add scrollback-up/down-line</title>
<updated>2020-09-10T16:17:47Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-09-10T16:17:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4d13429235e00290230dd7d070156c610a9502cc'/>
<id>urn:sha1:4d13429235e00290230dd7d070156c610a9502cc</id>
<content type='text'>
This deprecates/renames scrollback-up/down to scrollback-up/down-page.

It also renames scrollback-up/down-half to
scrollback-up/down-half-page, and adds the new bindings
scrollback-up/down-line.
</content>
</entry>
<entry>
<title>config: add scrollback-{up,down}-half key bindings</title>
<updated>2020-09-09T17:40:48Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-09-09T17:40:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2e3bd5e23c68280ec95498a4afe176b5f94964e0'/>
<id>urn:sha1:2e3bd5e23c68280ec95498a4afe176b5f94964e0</id>
<content type='text'>
These new bindings scroll up/down half a page in the
scrollback (instead of the full page scrolled by
‘scrollback-{up,down}’).

Closes #128.
</content>
</entry>
<entry>
<title>input: fix assertion when pressing first one mouse button, then another</title>
<updated>2020-09-07T17:35:25Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-09-07T17:35:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5f64c5c33590a41afd3f621870c6abd89b859073'/>
<id>urn:sha1:5f64c5c33590a41afd3f621870c6abd89b859073</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Cast printf formatter %p arguments to void*</title>
<updated>2020-08-23T08:07:08Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-08-23T05:50:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e32c0d9bf698782353bbe9e4348617523af473bd'/>
<id>urn:sha1:e32c0d9bf698782353bbe9e4348617523af473bd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>don't use empty struct initializers</title>
<updated>2020-08-23T08:07:00Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-08-23T05:42:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=dabdffafa59f43314333be42aa519d7fff1b4498'/>
<id>urn:sha1:dabdffafa59f43314333be42aa519d7fff1b4498</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: inhibit mouse events to client when a binding has consumed it</title>
<updated>2020-08-22T11:35:36Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-08-22T11:35:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=3ddc17937f19b63656ad8d79026e9afa90102ef7'/>
<id>urn:sha1:3ddc17937f19b63656ad8d79026e9afa90102ef7</id>
<content type='text'>
This introduces a new state to a seat's mouse struct, 'consumed'. It
is set on a mouse *press* event that is claimed by a mouse binding.

It is cleared after a mouse *release* event.

While set, *no* mouse motion or button events are sent to the client
application.
</content>
</entry>
<entry>
<title>Fix some spelling mistakes</title>
<updated>2020-08-15T18:39:00Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2020-08-15T18:39:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=104fe2fa55b113212899bea893a13fe7b3467156'/>
<id>urn:sha1:104fe2fa55b113212899bea893a13fe7b3467156</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: mouse motion: don't update selection while scrollback searching</title>
<updated>2020-08-14T05:38:56Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-08-11T14:36:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d29c4aed8a424b67eb0be4dbb7f8d964357cdfaa'/>
<id>urn:sha1:d29c4aed8a424b67eb0be4dbb7f8d964357cdfaa</id>
<content type='text'>
When we are doing a scrollback search, the selection *is* ongoing. We
still don't want to update the selection when the mouse moves.
</content>
</entry>
<entry>
<title>input: bindings: calculate 'cursor_is_on_grid' once only</title>
<updated>2020-08-14T05:38:56Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-08-11T08:53:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=bb9228dd21785c8621d9b413c3e630b5f47bbce4'/>
<id>urn:sha1:bb9228dd21785c8621d9b413c3e630b5f47bbce4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: mouse-bindings: ignore Shift</title>
<updated>2020-08-14T05:38:56Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-08-11T08:45:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=364412bfaa09b282389a988432cbe1aa2ad30bd8'/>
<id>urn:sha1:364412bfaa09b282389a988432cbe1aa2ad30bd8</id>
<content type='text'>
Shift is used to enable selection when the client application is
grabbing the mouse.

As such, mouse bindings *never* have Shift as a modifier, but should
still trigger when Shift is being pressed.
</content>
</entry>
<entry>
<title>input: mouse-bindings: check selection is enabled/possible and that pointer is on grid</title>
<updated>2020-08-14T05:38:56Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-08-11T08:42:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=28410f1b998d1b298941530355d1e6bb37f269a0'/>
<id>urn:sha1:28410f1b998d1b298941530355d1e6bb37f269a0</id>
<content type='text'>
We shouldn't start or modify a selection if selection isn't
possible (i.e. client application is grabbing the mouse, and user
isn't holding Shift).

We also shouldn't start or modify a selection if the pointer is
outside the grid (updating an ongoing selection on motion events is an
exception to this).
</content>
</entry>
<entry>
<title>config: mouse bindings: add select-begin-block and select-row</title>
<updated>2020-08-14T05:38:56Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-08-11T08:17:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4d2bc54fa216dfda98c4b228b9576dcad471858c'/>
<id>urn:sha1:4d2bc54fa216dfda98c4b228b9576dcad471858c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>config: add mouse specific bind actions</title>
<updated>2020-08-14T05:38:55Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-08-11T07:55:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=20f0334e1314508683651b0e5c59fd637d1d13f5'/>
<id>urn:sha1:20f0334e1314508683651b0e5c59fd637d1d13f5</id>
<content type='text'>
This extends the "normal" bind action enum with mouse specific
actions.

When parsing key bindings, we only check up to the last valid keyboard
binding, while mouse bindings support *both* key actions and mouse
actions.

The new actions are:

* select-begin: starts an interactive selection
* select-extend: interactively extend an existing selection
* select-word: select word under cursor
* select-word-whitespace: select word under cursor, where the only
  word separating characters are whitespace characters.

The old hard-coded selection "bindings" have been converted to instead
use these actions, via default bindings added to the configuration.
</content>
</entry>
<entry>
<title>Merge branch 'modifiers-in-mouse-bindings' into master</title>
<updated>2020-08-14T05:36:34Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-08-14T05:36:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9b65531d6a7f540b67ad87face1c911bb912a66c'/>
<id>urn:sha1:9b65531d6a7f540b67ad87face1c911bb912a66c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: don't crash on mouse motion events on the render timer surface</title>
<updated>2020-08-14T05:35:01Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-08-14T05:35:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=44557dc7cf2749469c0f093034f19491f710f540'/>
<id>urn:sha1:44557dc7cf2749469c0f093034f19491f710f540</id>
<content type='text'>
</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>
</feed>
