mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-08 08:20:59 -04:00
input: no extra key processing in alternate input modes
In 3a2eb80d83, we fixed an issue where
key *releases* triggered a selection reset, and viewport reset.
The same issue still exists in other input modes (unicode, search and
url mode); if the kitty keyboard protocol has been enabled, with
release events, any key press directed to e.g. search input handling,
will was not remembered, and the corresponding release event generated
a kitty keyboard event to the terminal application, and reset the
viewport and selection.
This means, for example, that scrollback search was unusable.
Fix by *never* doing any further (generic) key processing if an
alternate input mode is active.
Closes #2316
This commit is contained in:
parent
46a9cb8aab
commit
89d6ff10fa
2 changed files with 15 additions and 8 deletions
|
|
@ -78,8 +78,12 @@
|
||||||
|
|
||||||
* Other output (key presses, query replies etc) being mixed with paste
|
* Other output (key presses, query replies etc) being mixed with paste
|
||||||
data, both interactive pastes and OSC-52 ([#2307][2307]).
|
data, both interactive pastes and OSC-52 ([#2307][2307]).
|
||||||
|
* Scrollback search not working correctly when the terminal
|
||||||
|
application has enabled the kitty keyboard protocol with release
|
||||||
|
event reporting ([#2316][2316]).
|
||||||
|
|
||||||
[2307]: https://codeberg.org/dnkl/foot/issues/2307
|
[2307]: https://codeberg.org/dnkl/foot/issues/2307
|
||||||
|
[2316]: https://codeberg.org/dnkl/foot/issues/2316
|
||||||
|
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
|
||||||
7
input.c
7
input.c
|
|
@ -1643,31 +1643,34 @@ key_press_release(struct seat *seat, struct terminal *term, uint32_t serial,
|
||||||
seat->wayl->key_binding_manager, term->conf, seat);
|
seat->wayl->key_binding_manager, term->conf, seat);
|
||||||
xassert(bindings != NULL);
|
xassert(bindings != NULL);
|
||||||
|
|
||||||
if (pressed) {
|
|
||||||
if (term->unicode_mode.active) {
|
if (term->unicode_mode.active) {
|
||||||
|
if (pressed)
|
||||||
unicode_mode_input(seat, term, sym);
|
unicode_mode_input(seat, term, sym);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (term->is_searching) {
|
else if (term->is_searching) {
|
||||||
|
if (pressed) {
|
||||||
if (should_repeat)
|
if (should_repeat)
|
||||||
start_repeater(seat, key);
|
start_repeater(seat, key);
|
||||||
|
|
||||||
search_input(
|
search_input(
|
||||||
seat, term, bindings, key, sym, mods, consumed,
|
seat, term, bindings, key, sym, mods, consumed,
|
||||||
raw_syms, raw_count, serial);
|
raw_syms, raw_count, serial);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (urls_mode_is_active(term)) {
|
else if (urls_mode_is_active(term)) {
|
||||||
|
if (pressed) {
|
||||||
if (should_repeat)
|
if (should_repeat)
|
||||||
start_repeater(seat, key);
|
start_repeater(seat, key);
|
||||||
|
|
||||||
urls_input(
|
urls_input(
|
||||||
seat, term, bindings, key, sym, mods, consumed,
|
seat, term, bindings, key, sym, mods, consumed,
|
||||||
raw_syms, raw_count, serial);
|
raw_syms, raw_count, serial);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(_DEBUG) && defined(LOG_ENABLE_DBG) && LOG_ENABLE_DBG
|
#if defined(_DEBUG) && defined(LOG_ENABLE_DBG) && LOG_ENABLE_DBG
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue