diff --git a/openwhispr-ptt.py b/openwhispr-ptt.py index e08b042..c9423ca 100644 --- a/openwhispr-ptt.py +++ b/openwhispr-ptt.py @@ -38,18 +38,17 @@ is_recording = False def send_whispr_toggle(): """Send Ctrl+` to OpenWhispr via xdotool. - We first release Alt (which we're physically holding), send Ctrl+grave, - then re-press Alt. This way OpenWhispr sees clean Ctrl+` without - the Alt modifier corrupting it. + Release all held modifiers first, then send the full + keydown ctrl, key grave, keyup ctrl sequence cleanly. """ try: subprocess.run( - ["xdotool", "keyup", "alt"], + ["xdotool", "keyup", "ctrl", "alt", "super"], timeout=2, capture_output=True, ) subprocess.run( - ["xdotool", "key", WHISPR_HOTKEY], + ["xdotool", "keydown", "ctrl", "key", "grave", "keyup", "ctrl"], timeout=2, capture_output=True, )