Skip to content

Fix keyboard navigation when Presenter View has focus - #707

Merged
h-a-n-a-s-h-i merged 1 commit into
storytold:mainfrom
lambertoo:fix/presenter-keyboard-focus
Oct 14, 2026
Merged

h-a-n-a-s-h-i merged 1 commit into
storytold:mainfrom
lambertoo:fix/presenter-keyboard-focus

Conversation

@lambertoo

Copy link
Copy Markdown
Contributor

Presenter View receives keyboard events in its own egui viewport, but only the audience window handled slideshow keys. After focusing the notes/preview window, Right Arrow, Space, Page Up/Down and Escape did nothing.

Both windows now use the same keyboard handler. Handled events are consumed before presenter buttons, so Space cannot advance twice after clicking Next. Presenter View stays available on the end screen, and navigating back clears that state.

Related to #237 and #429. This handles input when Presenter View actually has focus; it does not change initial window activation or display placement. The existing Finder-opening work in #311/#432 is not included in this PR.

Validation:

  • Added a presenter-only regression test; it fails on the original code at Right Arrow (slide 0 instead of 1).
  • Added coverage for arrows, Space, Page Up/Down, Home/End, Escape, returning from the end screen, and avoiding duplicate advancement from a focused Next button or embedded presenter.
  • All three slideshow tests pass; targeted Clippy (-p deckcraft-ui-egui --all-targets --no-deps -- -D warnings), formatting, asset attribution, dependency layering and all WebAssembly checks pass.
  • The wider UI suite has two Korean-font failures that also reproduce with the original slideshow code.
  • Full cargo xtask ci is blocked by the pre-existing clippy::collapsible_match warning at crates/matroska/src/demux.rs:717 on Rust 1.95.0.

On macOS 26.5.2 (Apple silicon), Right Arrow was also verified in the focused native Presenter View. The user confirmed keyboard navigation works in the installed local build. The full scripted native sequence was limited by macOS fullscreen/Accessibility focus changes; the other key mappings are covered by the egui regression tests.

@h-a-n-a-s-h-i
h-a-n-a-s-h-i merged commit 1171e92 into storytold:main Oct 14, 2026
@echelon

echelon commented Oct 14, 2026

Copy link
Copy Markdown
Member

Thank you for this contribution, @lambertoo! It has landed on main and will ship in the next DeckCraft release.

If you haven't already, please come join us on Discord: https://discord.gg/artcraft

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.

3 participants