-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from pilgrimtabby/rework-keyboard
v1.0.7 (Rework keyboard) This PR shifts the code handling keyboard listener/controller backends from ui_controller to a new module called ui_keyboard_controller. This is done to keep keyboard handling in ui_controller abstract, and makes it easier to handle the complexities of using two different backends depending on the platform. In addition, this PR adds some unit tests for settings.py, splitter.py, and pilgrim_autosplitter.py. This whole project should have unit tests but I have limited time to devote to this right now, so it's not a priority. It also fixes several bugs, most related to hotkey implementation: - Hotkeys will no longer be bound to multiple keys when their key codes match (pynput only) - Hotkeys can no longer be bound if they have a key code but no name (pynput) -- this prevents the user from thinking no key is bound when in reality there is one - ui._poll is now called at the correct interval even after a settings change (whoops) - Fix implementation issue that could cause segmentation fault occasionally when binding hotkeys Other misc. changes/updates: - Automatically resize the font if hotkey names are larger than the hotkey box - On MacOS, make calls to caffeinate in separate thread to avoid bogging down main thread - Typehints are now uniform in style and backwards compatible with Python 3.8+ - Some class attributes and methods have been renamed for brevity and readability - Pytest added to requirements.txt and requirements-linux.txt - pilgrim_autosplitter.py rewritten for clarity and neatness - settings.py refactored to allow using different QSettings in functions for testing purposes - Some methods in splitter.py refactored and/or split into multiple methods for testing purposes
- Loading branch information
Showing
18 changed files
with
1,148 additions
and
388 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,4 @@ | |
**/_site | ||
**/.jekyll-cache | ||
pilgrim_autosplitter.spec | ||
|
||
**/.pytest_cache |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ opencv-python>=4.9.0.80 | |
pynput>=1.7.6 | ||
PyQt5>=5.15.10 | ||
PyQt5-sip>=12.13.0 | ||
pytest>=8.3.2 | ||
requests>=2.32.3 |
This file contains 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
Oops, something went wrong.