Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug (#16) preventing setting hotkeys sometimes #17

Merged
merged 2 commits into from
Jan 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/ui/ui_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -1661,11 +1661,19 @@ def _handle_key_press(
self._settings_window.toggle_global_hotkeys_hotkey_box,
]:
if hotkey_box.hasFocus():

# Set flags to be picked up by _react_to_settings_menu_flags
with self._hotkey_box_lock:
self._hotkey_box_to_change = hotkey_box
self._hotkey_box_key_code = key_code
self._hotkey_box_key_name = key_name
return

# Take focus off hotkey box so hotkey saves properly
# (needed on some Linux versions)
if platform.system() != "Windows" and platform.system() != "Darwin":
hotkey_box.clearFocus()

return

# Use #2 (set "hotkey pressed" flag for _react_to_hotkey_flags)
if not self._settings_window.isVisible():
Expand Down