Skip to content

Fix macOS search field keyboard shortcuts - #397

Closed
eryajf wants to merge 1 commit into
libracoder:mainfrom
eryajf:fix/search-field-shortcuts
Closed

eryajf wants to merge 1 commit into
libracoder:mainfrom
eryajf:fix/search-field-shortcuts

Conversation

@eryajf

@eryajf eryajf commented Nov 16, 2026 •

Copy link
Copy Markdown

What this changes and why

The top search field now preserves native text editing on all platforms and macOS exposes the standard Edit menu actions through the focused WKWebView. ⌘A selects the whole query, ⌘⌫ clears it, and ⌘Z restores the cleared value. The new native menu labels are translated for all 37 shipped languages, and the language tests now catch missing native menu translations.

No related issue: GitHub Issues are disabled on the fork, and the upstream issue search found no matching search-field issue.

How you tested it

cargo test -p kiri
# 382 passed; 6 ignored

python3 scripts/ui-test.py tests/ui/strip.js
# all tests passed

python3 scripts/ui-test.py
# all tests passed

git diff --check
# passed

Pre-fix search-field keyboard shortcuts:

Recording 2026-11-16 at 22-59-13

Post-fix search-field keyboard shortcuts:

Recording 2026-11-16 at 23-35-15

Tested on: macOS 26.4. The automated UI suite also covers the macOS, Windows and Linux page variants.

How you found it

  • I use Kiri and ran into this myself
  • I found it by reading the code or comparing with Docker
  • Someone else reported it (link the issue above)

AI tools used to write this change: yes — code investigation, implementation, test updates and PR preparation.

Checklist

  • I have at most 3 pull requests open on Kiri, this one included
  • cargo fmt, cargo clippy and the tests pass
  • It works on macOS, Windows and Linux, or the change only touches one of them

cargo fmt --check still reports pre-existing formatting differences in lang.rs, and cargo clippy was not run. The Rust and UI test commands above pass.

@libracoder

Copy link
Copy Markdown
Owner

@eryajf thanks for this PR. Before it can be reviewed and merged, every commit needs to be signed. GitHub shows these as unsigned: f0365f0. Please sign them (GPG or SSH, with the key added to your GitHub account as a signing key), then force-push. GitHub's guide: https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits

@libracoder

Copy link
Copy Markdown
Owner

Thanks @eryajf. #352 makes the same fix: an Edit menu, so ⌘Z ⇧⌘Z ⌘X ⌘C ⌘V ⌘A reach the window's text fields. It was opened first and fixes #340, so I'm closing this one in favour of it. Your user-select: text on the search field (.gfind input) is a real gap #352 doesn't cover yet. I've asked for it to be added there, and credited you.

@libracoder libracoder closed this Nov 16, 2026
sundarshahi added a commit to sundarshahi/kiri that referenced this pull request Nov 17, 2026
The window sets user-select: none on body, and .gfind input didn't turn it
back on. Credit to @eryajf, who spotted it in libracoder#397.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants