8 Commits
Author SHA1 Message Date
Claude a07869f8be Skip virtual keyboard devices (ydotoold) in device detection
find_keyboard() was matching ydotoold virtual device instead of the
real AT Translated Set 2 keyboard because evdev lists devices in
reverse order. Now skips devices with 'virtual' or 'ydotool' in name.

https://claude.ai/code/session_01XKYC1basxdwtHy71tky7xm
2026-03-25 21:42:45 +00:00
Claude 124fc8bc5b Release all modifiers before sending clean Ctrl+grave sequence
Use explicit keyup ctrl alt super first, then the exact working
sequence: keydown ctrl, key grave, keyup ctrl.

https://claude.ai/code/session_01XKYC1basxdwtHy71tky7xm
2026-03-25 20:40:47 +00:00
Claude 6991fdbbee Fix Ctrl+grave being sent without Ctrl due to --clearmodifiers
--clearmodifiers releases ALL modifiers including Ctrl, so xdotool
sends bare grave (types 'v'). Instead, explicitly release only Alt
before sending Ctrl+grave so OpenWhispr receives the correct combo.

https://claude.ai/code/session_01XKYC1basxdwtHy71tky7xm
2026-03-25 20:37:05 +00:00
Claude 9137bd2d80 Fix stop toggle not reaching OpenWhispr on key release
Add --clearmodifiers to xdotool so held Ctrl/Alt don't corrupt the
simulated Ctrl+` into Ctrl+Alt+`. Also add 50ms delay before stop
to let key release propagate to X11.

https://claude.ai/code/session_01XKYC1basxdwtHy71tky7xm
2026-03-25 20:33:03 +00:00
Claude 150485ee01 Switch PTT to evdev for reliable key state (no repeat spam)
pynput on X11 sees key repeats as real press/release pairs, causing
rapid-fire toggling. evdev gives event.value=2 for repeats which
we simply ignore. Only real press (1) and release (0) are handled.

Requires sudo or 'input' group membership.

https://claude.ai/code/session_01XKYC1basxdwtHy71tky7xm
2026-03-25 20:08:57 +00:00
Claude 723436dae9 Switch PTT hotkey from Ctrl+Super to Ctrl+Alt
Super key is intercepted by Cinnamon/window managers before reaching
the app. Ctrl+Alt is a better choice — works reliably on all DEs.

https://claude.ai/code/session_01XKYC1basxdwtHy71tky7xm
2026-03-25 20:01:10 +00:00
Claude aa8f40039a Fix PTT rapid-fire: track key state as booleans, ignore repeats
Super key generates rapid press/release events from key repeat.
Changed from set-based tracking to boolean flags (ctrl_held,
super_held) so repeated press events are ignored when the key
is already held. Removed min-hold cancel logic.

https://claude.ai/code/session_01XKYC1basxdwtHy71tky7xm
2026-03-25 20:00:19 +00:00
Claude e32dc5f690 Add push-to-talk wrapper for OpenWhispr
Python script that converts Ctrl+Super hold-to-talk into Ctrl+`
toggle pairs for OpenWhispr, working around the app's broken
Hold activation mode on Linux.

Uses pynput for key listening and xdotool to send hotkeys.

https://claude.ai/code/session_01XKYC1basxdwtHy71tky7xm
2026-03-25 19:56:43 +00:00