-
-
Notifications
You must be signed in to change notification settings - Fork 84
Description
Describe the bug
When using Amical for dictation on non-QWERTY keyboard layouts like Dvorak, the transcribed text is not pasted into the active application. Instead, an unintended keyboard shortcut (Cmd+K on Dvorak) is triggered.
This happens because the Swift helper uses hardcoded physical key codes to simulate Cmd+V. On Dvorak, the physical key position that corresponds to "V" on QWERTY actually produces "K".
App Version
v0.1.17
Model Information
Any (issue is unrelated to transcription model)
System Information
- Operating System: macOS (any version)
- Keyboard Layout: Dvorak (or any layout where 'V' is in a different physical position than QWERTY)
To Reproduce
- Set macOS keyboard layout to Dvorak
- Open any text editor (e.g., Notes, VS Code, Slack)
- Use Amical to dictate some text (hold the dictation shortcut key and speak)
- Release the key to complete dictation
- Observe that
Cmd+Kis triggered instead ofCmd+V
Expected behavior
Transcribed text should be pasted into the active application regardless of the user's keyboard layout.
Additional context
The root cause is in the Swift helper:
// packages/native-helpers/swift-helper/Sources/SwiftHelper/utils/Constants.swift
let VK_V: CGKeyCode = 9 // Physical key code for 'V' on US QWERTYmacOS key codes represent physical key positions, not characters:
| Key Code | Physical Position (US QWERTY) | Character on Dvorak |
|---|---|---|
| 9 | V | K |