Skip to content

fix: allow all punctuation keys as shortcuts + conflict guard#39

Open
sk8ersquare wants to merge 2 commits intopoodle64:mainfrom
sk8ersquare:pr/shortcut-improvements
Open

fix: allow all punctuation keys as shortcuts + conflict guard#39
sk8ersquare wants to merge 2 commits intopoodle64:mainfrom
sk8ersquare:pr/shortcut-improvements

Conversation

@sk8ersquare
Copy link
Copy Markdown

Two shortcut improvements.

Allow all punctuation keys as shortcuts

Keys like `, -, =, [, ], \, ;, ', ,, ., / were previously not registered as valid shortcut keys. Added the full set of standard punctuation keys.

Why it matters: Users who want shortcuts like Ctrl+; or Alt+, couldn't set them before.

Shortcut conflict guard

Prevents assigning the same key to two different shortcuts. Previously, if you set both toggle_recording and toggle_recording_alt to the same key, the first registration would succeed and the second would silently fail or cause unpredictable behaviour.

Now the UI shows a conflict warning and refuses to save the conflicting shortcut.

Eve added 2 commits March 23, 2026 16:42
… shortcuts (v2026.2.20)

Bugs fixed:
1. No cross-shortcut duplicate validation — assigning the same accelerator
   to two shortcuts would cause both to break (OS only allows one registration
   per key). Now shows an alert and rejects the duplicate.

2. register_shortcuts_from_config had no dedup guard — even if the config
   somehow had duplicates (e.g. from a prior version), Rust would try to
   register the same key twice, corrupting the first registration. Now dedupes
   before registering and logs a warning for the skipped entry.

Root cause of Arj's issue: pressing ` to set the dictionary shortcut while
` was already the toggle_recording key. Both shortcuts tried to own `,
resulting in all shortcuts breaking.
…, ,, ., / (v2026.2.21)

The webview key capture function only accepted letters, digits, and a small
set of special keys. All punctuation was silently dropped (returned null),
so pressing ` or ~ during shortcut capture appeared to do nothing.

Fixed webview_key_to_accelerator() to map all standard punctuation code names
to their Tauri accelerator equivalents (which global-hotkey fully supports):
  Backquote -> `
  Minus     -> -
  Equal     -> =
  BracketLeft/Right -> [ ]
  Backslash -> \
  Semicolon -> ;
  Quote     -> '
  Comma     -> ,
  Period    -> .
  Slash     -> /

Also updated webview_key_to_display() with matching display labels.
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