Skip to content

Global shortcut triggers recording while screensaver/lock screen is active #23

@poodle64

Description

@poodle64

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

  1. Set Right Shift as the recording shortcut
  2. Lock the screen or let the screensaver activate
  3. Press Right Shift to wake/dismiss the screensaver
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:highImportant, blocks functionality

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions