fix(search): give the in-place search a usable shortcut #55

Merged
BlackAngelTV merged 2 commits from fix/search-shortcut into main 2026-12-03 10:21:04 +01:00
Owner

Summary

search_scrollback_prompt was bound to kitty_mod+shift+f, which is the same physical key as kitty_mod+f. move_window_forward is defined on kitty_mod+f with --allow-fallback=shifted, so both definitions resolved to SingleKey(mods=5, key=102) and the last one won silently:

SingleKey(mods=5, key=102) -> ['search_scrollback_prompt', 'move_window_forward']

The search therefore had no reachable shortcut, as reported in #45.

The action now uses kitty_mod+alt+s (Ctrl+Shift+Alt+S by default), which is free: kitty_mod+alt only uses f, r, t and v in the default map.

Changes

  • kitty/options/definition.py + kitty/options/types.py: new default binding, help text mentions it.
  • docs/basic.rst, docs/changelog.rst, RACCOURCIS-CLAVIER.md: documented shortcut.
  • kitty_tests/options.py: regression test that the search has exactly one default shortcut and that no other action shares its trigger.

The remaining duplicate in the default map is the documented file-manager takeover of kitty_mod+e (see the changelog) and the kitty_mod+h conflict tracked in #46.

Tests

  • python3 -m unittest kitty_tests.options.TestConfParsing.test_default_search_shortcut
  • ruff check / ruff format --check

The resolved keymap was inspected with resolve_kitty_mod(); the terminal itself was not run.

Fixes #45

## Summary `search_scrollback_prompt` was bound to `kitty_mod+shift+f`, which is the same physical key as `kitty_mod+f`. `move_window_forward` is defined on `kitty_mod+f` with `--allow-fallback=shifted`, so both definitions resolved to `SingleKey(mods=5, key=102)` and the last one won silently: ```text SingleKey(mods=5, key=102) -> ['search_scrollback_prompt', 'move_window_forward'] ``` The search therefore had no reachable shortcut, as reported in #45. The action now uses `kitty_mod+alt+s` (`Ctrl+Shift+Alt+S` by default), which is free: `kitty_mod+alt` only uses `f`, `r`, `t` and `v` in the default map. ## Changes - `kitty/options/definition.py` + `kitty/options/types.py`: new default binding, help text mentions it. - `docs/basic.rst`, `docs/changelog.rst`, `RACCOURCIS-CLAVIER.md`: documented shortcut. - `kitty_tests/options.py`: regression test that the search has exactly one default shortcut and that no other action shares its trigger. The remaining duplicate in the default map is the documented file-manager takeover of `kitty_mod+e` (see the changelog) and the `kitty_mod+h` conflict tracked in #46. ## Tests - `python3 -m unittest kitty_tests.options.TestConfParsing.test_default_search_shortcut` - `ruff check` / `ruff format --check` The resolved keymap was inspected with `resolve_kitty_mod()`; the terminal itself was not run. Fixes #45
BlackAngelTV added 2 commits 2026-12-03 10:21:02 +01:00
kitty_mod+shift+f is the same physical key as kitty_mod+f, and
move_window_forward accepts the shifted fallback, so both definitions resolved
to the same trigger and the last one won: Ctrl+Shift+F moved the window instead
of opening the prompt, and the search had no shortcut at all. It now sits on
kitty_mod+alt+s, which no other default action claims.

Fixes #45
chore(release): bump the fork version to 0.1.13
CI / check (pull_request) Successful in 6m22s
474f1c0568
The default shortcut of the in-place search changed, so cut a patch release.
All the version copies must agree for the packaging workflow.
BlackAngelTV merged commit b994ccffce into main 2026-12-03 10:21:04 +01:00
BlackAngelTV deleted branch fix/search-shortcut 2026-12-03 10:21:07 +01:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: FWS/FWS-Kitty#55