Repository navigation
Rebind every canvas key; choose the double-tap key (⌘ by default on macOS) - #8
Merged
Merged
Conversation
Settings → Canvas keys lists every action — general, tools, colors, widths. Click a key and press the new combination to record it (Esc cancels); a combination already in use moves to the new action, ↺ restores one key, "Reset all keys" restores them all. - core/keymap.js: combos by physical key (e.code), Mod = Ctrl or ⌘, assignment, overrides vs defaults; tested with node:test - ui/shortcuts.js: the registry of actions and default keys; keyboard.js dispatches through it instead of hard-coded checks - the cheat sheet and toolbar tooltips show the current keys; the key hints are no longer baked into the translated labels - settings.json keeps only the overrides (`keys`); Rust validates their shape on load and in set_keys - holding and double-tapping Alt stay fixed (polled in keys.rs) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On macOS a double tap of ⌥ is taken by other apps (Claude's quick entry opens on it), and double ⇧ / ⌃ are JetBrains shortcuts, so toggling click-through with a double ⌥ also fired those. The double-tap key is now a setting — Alt, Ctrl, Shift, ⌘ (macOS only) or off — with ⌘ the default on macOS and Alt on Windows. Holding Alt / ⌥ is unchanged. - keys::Tap and poll(tap): the tap key is polled separately from the hold key; "other keys" exclude the tap key's own codes - tap_key in settings.json (invalid → platform default; missing → platform default, so existing Mac installs move to ⌘) - set_tap_key validates and updates the overlay state - Settings: a select next to the hotkey (hidden on Linux); the cheat sheet shows the chosen key Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Added: the double-tap key is now a setting (Settings → Double-tap for click-through): Alt, Ctrl, Shift, ⌘ (macOS only) or off.
Checked: Rust tests (13), the select in a browser harness for both Windows (no ⌘ option, Alt default) and macOS (⌘ default), the cheat sheet follows the choice, 🤖 Generated with Claude Code |
# Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Settings → Canvas keys: every canvas action is listed by group (general, tools, colors, widths). Click the key, press the new combination, and it is saved.
Esccancels recording.e.code), so they work on any layout.Modis Ctrl on Windows/Linux and ⌘ on macOS, and labels use ⌘ ⌥ ⇧ ⌃ on macOS.Altstay fixed: they are polled in Rust (keys.rs).How
src/core/keymap.js— pure logic: combo from a key event, resolve defaults + overrides, assign with stealing, lookup, digit runs for the cheat sheet. Tests intests/keymap.test.js.src/ui/shortcuts.js— the registry of actions and default keys;keyboard.jsdispatches through it instead of hard-codedifs.src/ui/keys-settings.js— the settings section.settings.jsonkeeps only the overrides (keys). Rust validates the shape on load and in the newset_keyscommand.Undo (Ctrl+Z)→Undo); the key is appended from the current bindings. 6 new strings in all 11 languages.Checked
npm run check,npm test(16, 4 new),cargo fmt --check,cargo clippy --all-targets -D warnings,cargo test(11, 1 new) — clean.Esccancel;npm startlaunches the app.CHANGELOG.mdgets a[0.4.0]section. #7 (Linux on 22.04, statistics fix) adds[0.3.1]; I'll merge both notes into[0.4.0]when releasing them together.🤖 Generated with Claude Code