Problem
Pressing a key (e.g. Right Shift) to dismiss the macOS screensaver/lock screen also triggers the global recording shortcut if that key is the configured hotkey. The recording starts while the user is still on the lock screen, which is unexpected and undesirable.
Expected Behaviour
Global shortcuts should be suppressed when the screensaver is active or the screen is locked. The keypress should only dismiss the screensaver without triggering any app functionality.
Reproduction
- Set Right Shift as the recording shortcut
- Lock the screen or let the screensaver activate
- Press Right Shift to wake/dismiss the screensaver
- Observe that Thoth starts recording
Solution
Check screen lock/screensaver state before processing global shortcut events. On macOS, this can be queried via CGSessionCopyCurrentDictionary() which includes CGSSessionScreenIsLocked key, or by checking if the login window is active.
Problem
Pressing a key (e.g. Right Shift) to dismiss the macOS screensaver/lock screen also triggers the global recording shortcut if that key is the configured hotkey. The recording starts while the user is still on the lock screen, which is unexpected and undesirable.
Expected Behaviour
Global shortcuts should be suppressed when the screensaver is active or the screen is locked. The keypress should only dismiss the screensaver without triggering any app functionality.
Reproduction
Solution
Check screen lock/screensaver state before processing global shortcut events. On macOS, this can be queried via
CGSessionCopyCurrentDictionary()which includesCGSSessionScreenIsLockedkey, or by checking if the login window is active.