mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-09-12 19:30:38 -07:00
fix(key_codes): add Function key arm so macOS fn can be bound to a chord (#950)
key_from_str() had no arm for "Function", so it fell through to None. Since build_chord propagates that as a hard Err via ?, binding any chord containing fn made build_chord_bindings fail entirely — HotkeyMonitor was never spawned, silently killing both push-to-talk and toggle-to-talk until the chord was reverted. Every other layer (keytap's macOS key tap, Key::Function itself, the frontend's canonicalKeyFromEvent/displayLabelForKey) already handles fn — only this string-to-Key bridge was missing the arm. Fixes #941
This commit is contained in:
@@ -30,6 +30,7 @@ pub fn key_from_str(name: &str) -> Option<Key> {
|
||||
"ShiftLeft" => Key::ShiftLeft,
|
||||
"ShiftRight" => Key::ShiftRight,
|
||||
"CapsLock" => Key::CapsLock,
|
||||
"Function" => Key::Function,
|
||||
|
||||
// Whitespace / navigation
|
||||
"Space" => Key::Space,
|
||||
|
||||
Reference in New Issue
Block a user