Improve hotkey capture and notification settings#3
Open
phoenixray2000 wants to merge 12 commits into
Open
Conversation
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
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, andRegisterHotKeywas not reliable for the reported shortcut becauseAlt+Shift+Ris already registered on this machine (ERROR_HOTKEY_ALREADY_REGISTERED, 1409). The runtime path now uses a low-level Windows hook for parsed hotkeys and keepskeyboardonly 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')"-> passeddist\\QuickAudioRecorder.exe