Skip to content

Improve hotkey capture and notification settings#3

Open
phoenixray2000 wants to merge 12 commits into
lukmay:masterfrom
phoenixray2000:codex-hotkey-notification-settings
Open

Improve hotkey capture and notification settings#3
phoenixray2000 wants to merge 12 commits into
lukmay:masterfrom
phoenixray2000:codex-hotkey-notification-settings

Conversation

@phoenixray2000
Copy link
Copy Markdown

@phoenixray2000 phoenixray2000 commented May 17, 2026

Summary

  • Add visible hotkey-capture feedback, clear/escape behavior, and robust Alt/Alt+Shift hotkey capture during settings edits.
  • Add settings to reuse the start-recording hotkey to stop active recordings and to enable/disable tray notifications.
  • Preserve legacy dedicated stop-hotkey behavior, update README docs, and add regression coverage for hotkey capture, settings migration, tray notifications, and record-hotkey stop behavior.
  • On Windows, run recording hotkeys through an app-owned low-level keyboard hook so mapped/injected shortcuts such as Caps+r -> Alt+Shift+R can trigger recording reliably.

Root cause

Qt could miss Alt-based letter events during settings capture, so capture needed a temporary keyboard hook. A later runtime issue came from the trigger side: keyboard.add_hotkey() can miss AHK-injected Alt combinations, and RegisterHotKey was not reliable for the reported shortcut because Alt+Shift+R is already registered on this machine (ERROR_HOTKEY_ALREADY_REGISTERED, 1409). The runtime path now uses a low-level Windows hook for parsed hotkeys and keeps keyboard only as a fallback for unsupported shortcut strings.

Impact

Users can configure Alt/Alt+Shift shortcuts reliably, see when the app is waiting for a shortcut, stop recording with the same start shortcut when enabled, choose whether tray popup notifications are shown, and trigger configured recording hotkeys through Caps-layer mappings.

Validation

  • .\\.venv\\Scripts\\python.exe -B -m unittest discover -s tests -v -> 26 tests passed
  • .\\.venv\\Scripts\\python.exe -m compileall -q main.py gui.py audio_recorder.py clipboard_utils.py tests -> passed
  • .\\.venv\\Scripts\\python.exe -c "import main; print('import main ok')" -> passed
  • PyInstaller packaging succeeded
  • Latest packaged artifact: dist\\QuickAudioRecorder.exe

@phoenixray2000 phoenixray2000 marked this pull request as ready for review May 17, 2026 19:54
@phoenixray2000
Copy link
Copy Markdown
Author

Latest update has been tested locally with the Caps-layer mapping case. The PR is mergeable and ready from my side; upstream maintainer permission is required to merge.

@phoenixray2000 phoenixray2000 changed the title [codex] Improve hotkey capture and notification settings Improve hotkey capture and notification settings May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant