Skip to content

Keyboard: Shift+Space and Ctrl+Space select without starting an edit (#338) - #395

Merged
h-a-n-a-s-h-i merged 1 commit into
storytold:mainfrom
vangel76:fix/space-selection-shortcuts
Oct 11, 2026
Merged

h-a-n-a-s-h-i merged 1 commit into
storytold:mainfrom
vangel76:fix/space-selection-shortcuts

Conversation

@vangel76

Copy link
Copy Markdown
Contributor

Refs #338

Root cause

  • Shift+Space selected the row, but the OS also sends Text(" "); the grid treated it as typing and called begin_edit(" ").
  • Ctrl+Space was bound to m.command only, which on macOS is Cmd (Spotlight). Excel for Mac uses Control+Space.

Changes

  • grid.rs: Text events are ignored in the same frame as a pressed key with Ctrl/Cmd (no Alt, so AltGr text still works) or Shift+Space.
  • keymap.rs: Space bindings moved into lookup: Shift+Space = row; Ctrl+Space (Windows/Linux) and Control+Space (Mac) = column; Cmd+Space is left unbound.
  • Docs: ui-parity revision row, one ROADMAP row.

Tests / commands

  • keyboard_shortcuts: Key(Space)+Text(" ") with Shift selects the row, with Ctrl selects the column, neither starts an edit; plain typing still edits; per-platform lookup test (incl. Cmd+Space unbound).
  • cargo test -p gridcraft-ui-egui --test keyboard_shortcuts, cargo clippy -p gridcraft-ui-egui --lib --test keyboard_shortcuts -- -D warnings, cargo fmt -p gridcraft-ui-egui -- --check.

Not done

  • The "other shortcuts not working" part of Grid Craft keybinds #338 depends on the reporter's answer. Windows-only checks of the OS-level text events are not done.

Unverified

  • Mac untested (Control+Space per Microsoft's published Mac list, from memory of the list, not re-checked on a Mac). Real OS event order (Key before Text) is assumed; the fix checks the whole frame so order does not matter.

🤖 Generated with Claude Code

@h-a-n-a-s-h-i
h-a-n-a-s-h-i merged commit 12b46e6 into storytold:main Oct 11, 2026
@echelon

echelon commented Oct 11, 2026

Copy link
Copy Markdown
Member

Merged — thank you for the contribution! (I resolved a small grid.rs conflict so the Alt+F8 Macros shortcut from #19 stays.)

If you haven't already, come join us on the ArtCraft 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