keepassium / KeePassium

KeePass-compatible password manager for iOS
https://keepassium.com
Other
1.21k stars 103 forks source link

Custom hotkeys/shortcuts/macros are blocked while KeePassium is running #343

Closed ezamelczyk closed 8 months ago

ezamelczyk commented 9 months ago

I'm using an MX Master 2s mouse and it has two buttons under my thumb that are mapped to switching workspaces (left/right). When I launch keepassium and unlock it everything works fine but when the keepassium window gains focus again it asks for a pin and it completely disables the desktop switching functionality of my mouse. It's like it's capturing all inputs and swallowing them. Unlocking it again does not fix the issue. I have to completely quit the app.

The issue does not occur with app protection disabled.

Environment:

keepassium commented 9 months ago

Yeah, this is quite an annoying one…

Apparently, Mac Catalyst automatically activates the (system-wide) Secure Input mode in password fields, but fails to disable it when the field/app loses input focus. As a result, the system blocks all the input monitoring/modifying apps (a macOS security feature) because it considers you keep entering something sensitive (a Mac Catalyst bug). Seems to be a widespread issue among macOS apps, too…

From a quick search, it seems to be possible to control this manually by tapping into some macOS-specific libraries. I will look into this.

keepassium commented 8 months ago

In order to test possible solutions, here are the steps to reproduce the issue:

  1. Enable app passcode and Touch ID
  2. Launch KeePassium, it shows Touch ID prompt. Secure input mode (SIM) = off
  3. In Touch ID prompt, click "Use Passcode", then click the passcode field to focus on it (SIM -> on)
  4. Press Esc to show Touch ID prompt again (SIM -> off)
  5. Cmd-Tab to another app (SIM = off)
  6. Cmd-Tab back to KeePassium (SIM -> on)
  7. Cmd-Tab to another app
    • Expected: SIM -> off
    • Observed: SIM remains ON, system-wide, until KeePassium is restarted
keepassium commented 8 months ago

@ezamelczyk, it should be better now, please check.

keepassium commented 8 months ago

Ok, I assume it is fixed.