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

Offen Anfängerfreundlich
#3,634 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@HlaKarki arbeitet bereits daran.

Seit 02.11.2026.

  • #3635 von @HlaKarki — offen

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
72/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
macos, rust, tauri
Bereich
desktop, devtools

Rechercherichtung

Der Fehler liegt in der Tastenzuordnung des Shortcut-Recorders: hotkey_code_for_key hat keinen Eintrag für Symbole mit Umschalttaste wie $, daher gibt shortcuts_capture_key für ⌘⇧4 unsupported_key zurück. Beginne mit dem Lesen von hotkey_code_for_key und dem Capture-Pfad, der cmd-$ empfängt, und entscheide dann, wie Ziffern und Symbole mit Umschalttaste auf physische Tastencodes abgebildet werden sollen. Fertig ist, wenn ⌘⇧4 und ⌘⇧/ erfolgreich aufgezeichnet werden und ein Test oder eine manuelle Prüfung bestätigt, dass der gespeicherte Shortcut zur physischen Taste passt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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
Vorherrschende Sprache
Rust
Sterne
24.2k
Forks
2.2k
Ø Merge
1 T. 9 Std.
Gemergte PRs (30 T.)
731

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus CapSoftware/Cap

Alle Issues in CapSoftware/Cap

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.