Skip to content

Handle ^n/^p like ^j/^k in the search field and guard them from native AppKit handling - #322

Merged
ospfranco merged 2 commits into
ospfranco:mainfrom
jwilges:main
Aug 12, 2026
Merged

ospfranco merged 2 commits into
ospfranco:mainfrom
jwilges:main

Conversation

@jwilges

@jwilges jwilges commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Hi @ospfranco, checking to see what you think about the following small changes that I've been running for a while now locally:

Today in Sol, ^j and ^k in the search field will navigate down/up in the list item selection below, which is fine, but these key presses currently also get handled natively by the text box causing an OS chime sound fruitlessly for cases like ^j which attempt to insert a new line on a single line text box. This is an oversight as far as I can tell, so I've added an early out to prevent that for all of the next/previous hotkeys.

I also aliased ^n and ^p as those are the most common/natural next and previous hotkeys natively in macOS and across Vim/Emacs. I left ^j and ^k as-is.

Prevents AppKit's default emacs-style text bindings (moveUp:/moveDown:/
insertNewline:) from firing on the focused field, which caused ctrl+n/p
to move the caret instead of the list selection, and ctrl+j to beep.
Mirrors the existing ctrl+j/k handling; grouped shared cases together
since j/n and k/p dispatch identical down/up key presses.
@jwilges jwilges changed the title Handle ^j/^p like ^j/^k in the search field and prevent them all from spilling into native AppKit handling Handle ^n/^p like ^j/^k in the search field and prevent them all from spilling into native AppKit handling Aug 12, 2026
@jwilges jwilges changed the title Handle ^n/^p like ^j/^k in the search field and prevent them all from spilling into native AppKit handling Handle ^n/^p like ^j/^k in the search field and guard them from native AppKit handling Aug 12, 2026
@ospfranco
ospfranco merged commit bd6dcc9 into ospfranco:main Aug 12, 2026
@ospfranco

Copy link
Copy Markdown
Owner

ah, sure, great! thanks!

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