Skip to content

Improve keyboard navigation: uppercase Q quit and more-style paging - #215

Closed
can2049 wants to merge 2 commits into
RivoLink:mainfrom
can2049:feature/quit-with-uppercase-q
Closed

Improve keyboard navigation: uppercase Q quit and more-style paging#215
can2049 wants to merge 2 commits into
RivoLink:mainfrom
can2049:feature/quit-with-uppercase-q

Conversation

@can2049

@can2049 can2049 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Accept uppercase Q as well as lowercase q to quit reading mode
  • Keep Ctrl+Q consistent with Ctrl+q for opening the fuzzy file picker
  • Add more-style paging: Space pages down, b pages up (same step as d/u / PgDn/PgUp)
  • Update help popup and status bar hints (q/Q quit, u/d spc/b)
  • Sync docs: README keybindings, Mermaid demo, and navigation demo

Motivation

  • Quit with Q: With a Chinese IME, switching to type lowercase q usually means leaving Chinese input first. With Caps Lock on, pressing Q exits without changing the input method.
  • Space / b paging: Matches familiar more/less habits so one-handed paging is easier while reading.

Test plan

  • cargo build (or cargo run -- README.md)
  • In reading mode, press q — app exits
  • In reading mode, press Q (or Caps Lock + Q) — app exits
  • In reading mode, press Space — page down (~20 lines)
  • In reading mode, press b — page up (~20 lines)
  • Confirm help (?) shows q/Q quit and u/d spc/b
  • Confirm status bar shows q/Q quit
  • Confirm README lists q/Q, Space, and b
  • Confirm Ctrl+q / Ctrl+Q still open the fuzzy file picker

@can2049 can2049 changed the title Allow quitting the viewer with uppercase Q Improve keyboard navigation: uppercase Q quit and more-style paging Jul 17, 2026
@can2049
can2049 force-pushed the feature/quit-with-uppercase-q branch from 31e7f12 to 9693f50 Compare July 17, 2026 12:00
can2049 and others added 2 commits July 17, 2026 20:02
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@can2049
can2049 force-pushed the feature/quit-with-uppercase-q branch from 9693f50 to 2d20faa Compare July 17, 2026 12:02
@RivoLink

Copy link
Copy Markdown
Owner

Hi, thanks for your PR!
I was just wondering if you have a specific use case that requires shift+q?

@can2049

can2049 commented Jul 18, 2026

Copy link
Copy Markdown
Contributor Author

Yes — with a Chinese IME, switching to type lowercase q usually means leaving Chinese input first. With Caps Lock on, pressing Q exits without changing the input method.

@RivoLink

Copy link
Copy Markdown
Owner

Hi,
I created a dedicated PR for your request: #216.
I made it a hidden shortcut because it's an extra feature that most users won't need.

I preserved you as the author and signed the commit with my GPG key, since GPG signing is required before merging into the main branch.

If you'd like to learn more about GPG commit signing, you can find the documentation here:
https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits

Thanks again for your interest in leaf and for your contribution!

@RivoLink RivoLink closed this Jul 18, 2026
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