<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/input.c, branch 1.6.0</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.6.0</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.6.0'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2020-12-12T20:10:28Z</updated>
<entry>
<title>input: make sure ‘surf_kind’ is not uninitialized</title>
<updated>2020-12-12T20:10:28Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-12-12T20:10:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=602dbdb9f67983e0827f20a412a847ae8713863f'/>
<id>urn:sha1:602dbdb9f67983e0827f20a412a847ae8713863f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: rework mouse button/motion handling</title>
<updated>2020-12-12T18:05:24Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-12-12T18:05:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ff96ce1e91e5a8de451541cc7584fb6f64a6564b'/>
<id>urn:sha1:ff96ce1e91e5a8de451541cc7584fb6f64a6564b</id>
<content type='text'>
Store a list of currently pressed buttons, and which surface they
belong to (i.e. which surface that received the press).

Then, in motion events (with a button pressed, aka drag operations),
send the event to the “original” surface (that received the press).

Also send release events to the originating surface.

This means a surface receiving a press will always receive a
corresponding release. And no one will receive a release event without
a corresponding press event.

Motion events with a button pressed will *always* use the *first*
button that was pressed. I.e. if you press a button, start dragging,
and then press another button, we keep generating motion events for
the *first* button.
</content>
</entry>
<entry>
<title>input: report mouse drag events also when the pointer is outside the grid</title>
<updated>2020-12-11T20:01:00Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-12-11T19:48:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a1a0b489eec73b8e4823cf210fbebfe1fd1d1efa'/>
<id>urn:sha1:a1a0b489eec73b8e4823cf210fbebfe1fd1d1efa</id>
<content type='text'>
As long as the mouse button was *pressed* while the pointer was inside
the grid, we want to keep reporting motion events until the button is
released.

Even when the pointer moves outside the grid (but in this case, the
reported coordinates are bounded by the grid size).

This patch also tries to improve multi-button handling (i.e. multiple
buttons pressed at the same time), and the events we report to the
client for these, in the following ways:

* Motion events now report the *initial* button. That is, if you start
  a drag operation with the LEFT button, then press RIGHT (before
  releasing LEFT), keep reporting LEFT in the motion events.
* Mouse release events are reported for *any* button, as long as the
  pointer is *inside* the grid, *or*, the button released was the
  button used to start a drag operation.

The last point is important; if we have reported a button press
followed by motion events (i.e. a drag operation), we need to report
the button release, *even* if the pointer is outside the grid.

Note that the client may receive unbalanced button press/release
events in the following ways if the user pressed one, and then a
second button *inside* the grid, then releases the *first*
button (possibly outside the grid), and finally releases the *second*
button *outside* the grid.

In this case, both buttons will report press events. The first button
will report a release event since it is the initial button in the drag
operation.

However, we don’t track the fact that the second button is being
pressed, and thus if it is released outside the grid, it wont generate
a release event.
</content>
</entry>
<entry>
<title>Merge branch 'remove-deprecated-things'</title>
<updated>2020-12-09T19:53:05Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-12-09T19:53:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=3e25faeae74244f04cd4a5e7ff3bae4bd82ff385'/>
<id>urn:sha1:3e25faeae74244f04cd4a5e7ff3bae4bd82ff385</id>
<content type='text'>
</content>
</entry>
<entry>
<title>config: remove support for scrollback-up and scrollback-down</title>
<updated>2020-12-08T18:58:02Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-12-08T18:58:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5020366bf59f47d36d4a2d33ac9501f401dfaf5c'/>
<id>urn:sha1:5020366bf59f47d36d4a2d33ac9501f401dfaf5c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ime: render pre-edit text</title>
<updated>2020-12-07T19:44:10Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-12-02T17:52:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=8c3d48c5cdb2ae4e8bdbdc48f155f53d1a92973b'/>
<id>urn:sha1:8c3d48c5cdb2ae4e8bdbdc48f155f53d1a92973b</id>
<content type='text'>
This is done by allocating cells for the pre-edit text when receiving
the text-input::done() call, and populating them by converting the
utf-8 formatted pre-edit text to wchars.

We also convert the pre-edit cursor position to cell positions (it can
cover multiple cells).

When rendering, we simply render the pre-edit cells on-top off the
regular grid. While doing so, we also mark the underlying, “real”,
cells as dirty, to ensure they are re-rendered when the pre-edit text
is modified or removed.
</content>
</entry>
<entry>
<title>ime: wip: commit all changes in ‘done()’</title>
<updated>2020-12-07T19:44:10Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-12-01T18:31:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5745c610ac5e9b96f9bac8347c6a5645d89a66c6'/>
<id>urn:sha1:5745c610ac5e9b96f9bac8347c6a5645d89a66c6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge branch 'modify-escape-key'</title>
<updated>2020-12-01T17:31:25Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-12-01T17:31:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c3201b9770339905b46c464a29ec178f68821241'/>
<id>urn:sha1:c3201b9770339905b46c464a29ec178f68821241</id>
<content type='text'>
Closes #225
</content>
</entry>
<entry>
<title>input: relax requirements for overriding keypad application mode</title>
<updated>2020-12-01T17:27:56Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-12-01T17:27:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c44c7cc5beeeda070126feed003f3e2fd18aa5a0'/>
<id>urn:sha1:c44c7cc5beeeda070126feed003f3e2fd18aa5a0</id>
<content type='text'>
Don’t require NumLock to be locked. Foot has no idea _which_ modifier
the user has mapped NumLock to, meaning we really cannot require it to
be locked.
</content>
</entry>
<entry>
<title>input: improved debug logging of pressed keys</title>
<updated>2020-11-30T19:01:46Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-11-30T19:01:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=09c88e67154f81c97b78da75e89483533628affe'/>
<id>urn:sha1:09c88e67154f81c97b78da75e89483533628affe</id>
<content type='text'>
</content>
</entry>
<entry>
<title>csi: add new private mode that makes the Escape key emit "\E[27;1;27~"</title>
<updated>2020-11-29T04:04:57Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2020-11-29T04:04:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=31c73f0cf01e1d0bdcd1435136b010c1c1ab442c'/>
<id>urn:sha1:31c73f0cf01e1d0bdcd1435136b010c1c1ab442c</id>
<content type='text'>
This mode can be set by client programs with the DECSET, DECRST,
XTSAVE and XTRESTORE sequences by using 27127 as the parameter.

The sequence "\E[27;1;27~" is encoded in the same way as is done by
xterm's "modifyOtherKeys" mode. Even though xterm itself never emits
such a sequence for the Escape key, many programs already have
support for parsing this style of key sequence.
</content>
</entry>
<entry>
<title>keymap: use same lookup table for Tab and ISO_Left_Tab</title>
<updated>2020-11-19T18:22:48Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-11-19T18:15:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=121b488e7444234b6dc9d771b8178d45d1880b63'/>
<id>urn:sha1:121b488e7444234b6dc9d771b8178d45d1880b63</id>
<content type='text'>
With XKB, Shift+Tab maps to XKB_KEY_ISO_Left_Tab, not
XKB_Key_Tab. Previously, we had two different lookup tables for the
two.

The tab table was correctly populated, while the ISO-left tab
wasn’t. As a result, all Shift+Tab combos (except Shift+Tab itself)
was wrong, and resulted in the same escape sequence as Shift+Tab.

Fix by using the same table for both tab and ISO-left tab.

Closes #210
</content>
</entry>
<entry>
<title>input: enforce ‘numerical’ keypad mode when Num Lock override is enabled</title>
<updated>2020-11-11T17:28:37Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-11-11T17:28:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=deb2c2db6d153c6f9e89a3180180edda5bc6786c'/>
<id>urn:sha1:deb2c2db6d153c6f9e89a3180180edda5bc6786c</id>
<content type='text'>
When num lock override has been enabled via “CSI?1035h” (the default),
keypad is always considered to be in ‘numerical’ mode.

This affects how keypad keys are translated to escape sequences when
Num Lock is active.

The keypad has four modes:

* Num Lock off, numerical mode
* Num Lock off, application mode
* Num Lock on, numerical mode
* Num Lock on, application mode

The keymap is identical for numerical and application mode when Num
Lock is off, meaning the keypad effectively has three different modes.

In XTerm, numerical and application mode _can_ be the same, **if** the
‘numLock’ resource is set to true (the default). It is only when
‘numLock’ is false that the application mode is actually used.

This patch changes foot to do the same. We don’t expose an option, but
do implement “CSI ? 1035”.

Closes #194
</content>
</entry>
<entry>
<title>input: track num lock state</title>
<updated>2020-11-11T17:28:13Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-11-11T17:28:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=bdaf20ba71fe9ae5222f259e286f627c36603732'/>
<id>urn:sha1:bdaf20ba71fe9ae5222f259e286f627c36603732</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: use XKB_MOD_NAME_* macros instead of hard-coded strings</title>
<updated>2020-11-11T17:25:54Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-11-11T17:25:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=75bd780f0296b7a9b73068a05fc367c435455cfd'/>
<id>urn:sha1:75bd780f0296b7a9b73068a05fc367c435455cfd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: ignore keymap if we don’t recognize its format</title>
<updated>2020-11-09T18:59:48Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-11-09T18:59:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=3fa3c58c8b74dfe8463934ccca95c7703a9cb2bc'/>
<id>urn:sha1:3fa3c58c8b74dfe8463934ccca95c7703a9cb2bc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>config: add support for pipe-* actions in mouse bindings</title>
<updated>2020-11-06T18:30:05Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-11-06T18:29:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9ce79e2ef0b0b19b06990302807d6c3b3a755e1e'/>
<id>urn:sha1:9ce79e2ef0b0b19b06990302807d6c3b3a755e1e</id>
<content type='text'>
Closes #183
</content>
</entry>
<entry>
<title>input: don’t use seat-&gt;kbd_focus as terminal when processing a key press</title>
<updated>2020-11-03T18:44:51Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-11-03T18:44:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9209adf6faa1222d9a60b63e69eadd04820976db'/>
<id>urn:sha1:9209adf6faa1222d9a60b63e69eadd04820976db</id>
<content type='text'>
When converting mouse scroll events to keyboard input (in alternate
scroll mode), we need to use seat-&gt;mouse_focus, not seat-&gt;kbd_focus.

To enable this, break out key press/release handling code to a
separate function that takes an explicit term argument. Call this
function from keyboard_key(), input_repeat() and in alternate scroll
mode.

Closes #179
</content>
</entry>
<entry>
<title>input: handle XKB errors</title>
<updated>2020-10-20T19:01:33Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-10-20T19:01:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0d319f87936ea336d50b982344dc55aa58d25fb9'/>
<id>urn:sha1:0d319f87936ea336d50b982344dc55aa58d25fb9</id>
<content type='text'>
* Don’t de-reference the xkb context/keymap/state if we failed to
  instantiate them.
* Don’t try to send a translated utf8 key sequence if the translation
  failed.
* Handle xkb_compose_state_get_utf8() and xkb_state_key_get_utf8()
  returning more than 64 bytes.

This _may_ fix #171.
</content>
</entry>
<entry>
<title>input: don’t allow diagonal resize when tiled</title>
<updated>2020-10-20T19:00:19Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-10-20T19:00:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4c3d2cfc7d14daada6614d5b301afa61633fcc5d'/>
<id>urn:sha1:4c3d2cfc7d14daada6614d5b301afa61633fcc5d</id>
<content type='text'>
</content>
</entry>
</feed>
