diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2026-04-06 08:45:43 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2026-04-06 09:10:38 +0000 |
| commit | 89d6ff10fa816f11c1fa20368e4cc3464549955e (patch) | |
| tree | 8c7d66a4bd50a0fce822ee0a8834352ea1f2168d /input.c | |
| parent | osc-52: don't strip any control characters, and don't do newline conversion (diff) | |
input: no extra key processing in alternate input modes
In 3a2eb80d83d59d194a3d07da227431c634892ff5, 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
Diffstat (limited to 'input.c')
| -rw-r--r-- | input.c | 19 |
1 files changed, 11 insertions, 8 deletions
@@ -1643,31 +1643,34 @@ key_press_release(struct seat *seat, struct terminal *term, uint32_t serial, seat->wayl->key_binding_manager, term->conf, seat); xassert(bindings != NULL); - if (pressed) { - if (term->unicode_mode.active) { + if (term->unicode_mode.active) { + if (pressed) unicode_mode_input(seat, term, sym); - return; - } + return; + } - else if (term->is_searching) { + else if (term->is_searching) { + if (pressed) { if (should_repeat) start_repeater(seat, key); search_input( seat, term, bindings, key, sym, mods, consumed, 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) start_repeater(seat, key); urls_input( seat, term, bindings, key, sym, mods, consumed, raw_syms, raw_count, serial); - return; } + return; } #if defined(_DEBUG) && defined(LOG_ENABLE_DBG) && LOG_ENABLE_DBG |
