15 Commits
Author SHA1 Message Date
Claude 9292ebf714 Restructure repo: PTT workaround is now the primary focus
README rewritten to lead with the push-to-talk setup script as
the main feature, with the full OpenWhispr installer demoted to
an optional collapsed section. Documents known Linux bugs in
OpenWhispr (Hold mode, Ctrl+Super, settings persistence).

CHANGELOG updated with v1.1.0 entry.

https://claude.ai/code/session_01XKYC1basxdwtHy71tky7xm
2026-03-26 13:25:44 +00:00
Claude 62b2a2277e Fix NameError: add ecodes. prefix to all key code references
The template was expanding KEY_LEFTCTRL, KEY_RIGHTCTRL but only
prepending ecodes. to the first one. Now all key codes include
the ecodes. prefix in the case statement values.

https://claude.ai/code/session_01XKYC1basxdwtHy71tky7xm
2026-03-26 04:06:49 +00:00
Claude 22d4f64bb3 Add one-shot PTT setup script with systemd service and uninstall
setup-ptt.sh handles everything in one run:
- Adds user to input group (no sudo for PTT)
- Installs evdev Python module
- Interactive hotkey selection (5 options)
- Generates PTT Python script with chosen hotkey
- Creates systemd user service (auto-start, restart on failure)
- Checks if OpenWhispr is running, offers to launch
- Creates uninstall script
- Prints useful commands summary

https://claude.ai/code/session_01XKYC1basxdwtHy71tky7xm
2026-03-26 04:00:19 +00:00
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
Claude cc847cff67 Wrap script in main() to prevent line-by-line execution bug
When run via `bash <(curl ...)`, bash reads the script incrementally
from a process substitution fd. If a `read < /dev/tty` call disrupts
the fd state, bash can lose its place and the remaining script lines
get fed to the interactive shell prompt as individual commands.

Wrapping everything in main() forces bash to parse the entire script
into memory before executing any of it — the standard fix for
curl-piped scripts.

Also changed README one-liner to download-then-execute pattern
(curl -o /tmp/... && bash /tmp/...) as a belt-and-suspenders approach.

https://claude.ai/code/session_01XKYC1basxdwtHy71tky7xm
2026-03-25 13:37:29 +00:00
Claude 1c7866bc0a Fix script breaking when run via bash <(curl ...) pipe
Replace `exec < /dev/tty` (which hijacks bash's script-reading fd and
causes the rest of the script to be interpreted as shell commands) with
per-call `< /dev/tty` redirection on every `read` and prompt `printf`.

This preserves bash's ability to continue reading the script from the
process substitution while still getting interactive input from the
real terminal.

https://claude.ai/code/session_01XKYC1basxdwtHy71tky7xm
2026-03-25 13:36:28 +00:00
Claude eb092825c2 Fix stdin when piped, improve binary detection, replace YOUR_USERNAME
- Add `exec < /dev/tty` so `read` works correctly when run via
  `bash <(curl ...)` — fixes script failing after pasting API keys
  or clicking terminal links
- Search /opt/, /usr/lib/, /snap/bin/ and `dpkg -L` for the
  open-whispr binary — fixes "Could not find openwhispr in PATH"
- Replace YOUR_USERNAME with outis1one in all files
- Show detected binary name in summary useful commands

https://claude.ai/code/session_01XKYC1basxdwtHy71tky7xm
2026-03-25 13:29:17 +00:00
Claude da73b43b1d Add OpenWhispr easy setup installer and companion files
Single-file bash installer (setup-openwhispr.sh) with distro detection,
dependency installation, STT/AI cleanup provider selection, API key
management, and first-run launch. Includes README, LICENSE (MIT),
CHANGELOG, .gitignore, ShellCheck CI, issue templates, PR template,
and GitHub setup guide.

https://claude.ai/code/session_01XKYC1basxdwtHy71tky7xm
2026-03-25 12:57:53 +00:00