From 365c2c31ab8bd16a0308add0734db3d93ff881ee Mon Sep 17 00:00:00 2001 From: Sai Sridhar Tarra <117087864+sridhar-3009@users.noreply.github.com> Date: Mon, 27 Jul 2026 12:01:54 +0530 Subject: [PATCH] fix(key_codes): add Function key arm so macOS fn can be bound to a chord (#950) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- tauri/src-tauri/src/key_codes.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/tauri/src-tauri/src/key_codes.rs b/tauri/src-tauri/src/key_codes.rs index 0b0019cf..58098cd2 100644 --- a/tauri/src-tauri/src/key_codes.rs +++ b/tauri/src-tauri/src/key_codes.rs @@ -30,6 +30,7 @@ pub fn key_from_str(name: &str) -> Option { "ShiftLeft" => Key::ShiftLeft, "ShiftRight" => Key::ShiftRight, "CapsLock" => Key::CapsLock, + "Function" => Key::Function, // Whitespace / navigation "Space" => Key::Space,