Shortcut recorder rejects ⌘⇧ with a digit or symbol (e.g. ⌘⇧4)

Open Beginner friendly
#3,634 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@HlaKarki is already working on this.

Since Nov 2, 2026.

  • #3635 by @HlaKarki — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
macos, rust, tauri
Domain
desktop, devtools

Research direction

The bug is in the shortcut recorder's key mapping: hotkey_code_for_key has no entry for shifted symbols such as $, so shortcuts_capture_key returns unsupported_key for ⌘⇧4. Start by reading hotkey_code_for_key and the capture path that receives cmd-$, then decide how shifted digits and symbols should map to physical key codes. Done means ⌘⇧4 and ⌘⇧/ record successfully and a test or manual check confirms the stored shortcut matches the physical key.

Written by the indexing model from the issue text.

Description

Description

Recording ⌘⇧4 for "Screenshot an area" shows "That key can't be used in a shortcut. Try a letter, number or F-key." The same happens for ⌘⇧ with any digit or punctuation key, like ⌘⇧1 or ⌘⇧/. ⌘⇧ with a letter records fine.

The macOS screenshot shortcuts are turned off on this Mac, and the other screenshot apps here (Shottr, CleanShot X) don't bind ⌘⇧4.

On macOS, gpui reports a shifted digit or symbol as the character it types and clears Shift, so ⌘⇧4 reaches shortcuts_capture_key as cmd-$. hotkey_code_for_key has no entry for $, so the recorder shows unsupported_key. The Tauri app stored e.code and e.shiftKey, so ⌘⇧4 recorded there.

Reproduction
  1. Open Settings → Shortcuts → Screenshot an area → Record shortcut.
  2. Press ⌘⇧4.
Additional Context
  • Cap version: 0.6.2
  • Operating system, version: macOS 27.0
  • Device (optional): Apple Silicon
Cap shortcut recorder showing the unsupported key error after pressing ⌘⇧4
Dominant language
Rust
Stars
24.2k
Forks
2.2k
Avg merge
1d 9h
Merged PRs (30d)
731

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from CapSoftware/Cap

All issues in CapSoftware/Cap

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.