jjui icon indicating copy to clipboard operation
jjui copied to clipboard

FR: Keyboard shortcut to close preview

Open tekumara opened this issue 1 month ago • 3 comments

Thankyou for a very useful tool!

I'd like to use esc to close the preview instead of p.

This would align with other pop-up panes like help, git operations etc.

(It also aligns with lazygit and lazy nvim - hence my confusion!)

Is it possible to make this the default, or configurable?

tekumara avatar Nov 01 '25 20:11 tekumara

Thank you for a very useful tool!

+1 on that.

Also a bit of a similar request: esc and not q closes diffs, while q and not esc closes jjui. So currently if I have a diff open and I want to exit the entire things I have to smash q and esc repeatedly until the entire thing closes.

SandaruKasa avatar Nov 02 '25 21:11 SandaruKasa

So currently if I have a diff open and I want to exit the entire things I have to smash q and esc repeatedly until the entire thing closes.

Oh yeh, I bump into that too! +1 for a consistent key (ie: q) to close full screens (like diff, evolog) and esc for pop-up panes or expansions. At least for me, it would make navigation more fluent and intuitive.

tekumara avatar Nov 02 '25 22:11 tekumara

hey @tekumara @SandaruKasa

thanks for the report, there were similar requests in the past, it's definitely a good point on consistency with q and esc!

e.g., see #299 from @idursun:

Technically, preview window never receives focus (yet!), so esc key shouldn't close it as it is not the focused element. This also wouldn't play nicely with the other parts of the UX (e.g. flash messages). Additionally, some folks wanted esc to close the app if the revisions view is in the normal mode, so this change would also change that established behaviour.

I am afraid this doesn't seem very intuitive at the moment, but that might change once I am done with the new view management system.

baggiiiie avatar Nov 03 '25 04:11 baggiiiie