Skip to content

feat(shortcuts): delete selected annotations with the delete key - #925

Merged
PaulHax merged 1 commit into
Kitware:mainfrom
PaulHax:keyboard-event-dispatch
Aug 18, 2026
Merged

feat(shortcuts): delete selected annotations with the delete key#925
PaulHax merged 1 commit into
Kitware:mainfrom
PaulHax:keyboard-event-dispatch

Conversation

@PaulHax

@PaulHax PaulHax commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

The delete key had to reach the app while a checkbox or slider held focus, which the old dispatcher could not do: it watched vueuse magic keys, rebuilt every watcher whenever a binding changed, and decided whether to suppress a shortcut by asking what kind of element had focus.

Shortcuts now dispatch from one keydown listener against a table of parsed bindings. Anything a control handles in script reports itself through preventDefault, so arbitration only has to cover what the browser does natively and no handler announces: typing into a field, Space or Enter activating a focused control, and the arrow keys stepping through a group of values.

An action can name more than one key, since the main delete key reports Backspace on macOS. Hold actions read their state through useActionHeld instead of each view resolving a binding itself, and a binding no keystroke could produce is dropped from a loaded config with a warning rather than rejecting the file.

Removing a selection says how many annotations went, because the selection can hold annotations with no visible cue in the current view and there is no undo.

The delete key had to reach the app while a checkbox or slider held focus,
which the old dispatcher could not do: it watched vueuse magic keys, rebuilt
every watcher whenever a binding changed, and decided whether to suppress a
shortcut by asking what kind of element had focus.

Shortcuts now dispatch from one keydown listener against a table of parsed
bindings. Anything a control handles in script reports itself through
preventDefault, so arbitration only has to cover what the browser does
natively and no handler announces: typing into a field, Space or Enter
activating a focused control, and the arrow keys stepping through a group of
values.

An action can name more than one key, since the main delete key reports
Backspace on macOS. Hold actions read their state through useActionHeld
instead of each view resolving a binding itself, and a binding no keystroke
could produce is dropped from a loaded config with a warning rather than
rejecting the file.

Removing a selection says how many annotations went, because the selection
can hold annotations with no visible cue in the current view and there is no
undo.
@netlify

netlify Bot commented Aug 18, 2026

Copy link
Copy Markdown

Deploy Preview for volview-dev ready!

Name Link
🔨 Latest commit 32c037e
🔍 Latest deploy log https://app.netlify.com/projects/volview-dev/deploys/6a8478d57e96940009f4dec0
😎 Deploy Preview https://deploy-preview-925--volview-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@PaulHax
PaulHax added this pull request to the merge queue Aug 18, 2026
Merged via the queue into Kitware:main with commit 45ca1a4 Aug 18, 2026
7 of 8 checks passed
@PaulHax
PaulHax deleted the keyboard-event-dispatch branch August 18, 2026 15:41
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.

1 participant