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 global Auto-Type when database locked #3138

Merged
merged 1 commit into from May 12, 2019

Conversation

droidmonkey
Copy link
Member

@droidmonkey droidmonkey commented May 11, 2019

Type of change

  • ✅ Bug fix (non-breaking change which fixes an issue)

Description and Context

Testing strategy

Tested on Windows and macOS

Checklist:

  • ✅ I have read the CONTRIBUTING document. [REQUIRED]
  • ✅ My code follows the code style of this project. [REQUIRED]
  • ✅ All new and existing tests passed. [REQUIRED]
  • ✅ I have compiled and verified my code with -DWITH_ASAN=ON. [REQUIRED]
  • ✅ My change requires a change to the documentation, and I have updated it accordingly.
  • ✅ I have added tests to cover my changes.

Copy link
Member

@phoerious phoerious left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@veysiertekin
Copy link

Hi @droidmonkey ,

I got a build from the branch, and tested. Problem #1216 seems still exists when database is locked ☹️

Screen Shot 2019-05-11 at 18 48 50

Also, if database is not locked, auto-type window does not get any focus. When i click the entry, immediately auto-type window get closed and does not type anything.

Screen Shot 2019-05-11 at 18 46 14

@droidmonkey
Copy link
Member Author

I cannot fix the main window appearing.... That is a mac "feature". You have to be careful not to click anything after you unlock and (maybe) select an entry. You might have to increase your auto type delay to make sure things settle before typing begins.

@veysiertekin
Copy link

I cannot fix the main window appearing.... That is a mac "feature".

Ok, that is an understandable reason ☺️


After unlocking the database, auto-type window gets open, but when i select any entry via keyword, does not type anything. I have tested with "Auto-type start delay" -> "1000ms" or "3000ms", and "Auto-type typing delay" with "100ms" nothing changed ☹️

Also when database is not locked and pressed global auto-type, like i mentioned above; auto-type window does not get focused there for i can not select any entry.

@weslly
Copy link
Contributor

weslly commented May 11, 2019

I cannot fix the main window appearing.... That is a mac "feature". You have to be careful not to click anything after you unlock and (maybe) select an entry. You might have to increase your auto type delay to make sure things settle before typing begins.

Wouldn't it be better to just disable the additional popup on macOS? I already tried to hide the main window before but I don't think it is possible at all to do that with Qt on macOS

Copy link
Contributor

@weslly weslly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works great!

@droidmonkey
Copy link
Member Author

Disabling the popup would require a big refactor. I'm saving that for 2.5.0

* Store the currently active window right when the global keyboard shortcut is triggered
* Eliminate unnecessary window raise/lower and delays on macOS
* Remove duplicate addition of macutils symbols from mac Auto-Type plugin
* Fix tests to fake trigger a global autotype sequence
@droidmonkey
Copy link
Member Author

@veysiertekin I see what you mean, once the database was unlocked subsequent presses of the global auto-type shortcut causes the sequence selection dialog to not have focus. I have fixed this issue with the latest push, please try it again. I also lowered the activation delays so it feels a little more responsive.

@veysiertekin
Copy link

Hi @droidmonkey,

I have tested with your latest changes. Seems focusing problem has been fixed, but after selection of an entry, it goes back the application (in this case my browser), and keepassxc does not type anything like i mentioned above 😞 Not even a single character. (By the way i have build with qt/5.12.3, and tested on macOS 10.14.3)

@droidmonkey
Copy link
Member Author

You probably have to disable/enable the accessibility access for your custom built application. You do that in macOS settings

@veysiertekin
Copy link

After addition to accessibility controls, worked as expected!
Thanks @droidmonkey

@droidmonkey droidmonkey merged commit 6385534 into release/2.4.2 May 12, 2019
@droidmonkey droidmonkey deleted the hotfix/autotype-mac branch May 12, 2019 16:37
droidmonkey added a commit that referenced this pull request May 31, 2019
- Improve resilience against memory attacks - overwrite memory before free [#3020]
- Prevent infinite save loop when location is unavailable [#3026]
- Attempt to fix quitting application when shutdown or logout issued [#3199]
- Support merging database custom data [#3002]
- Fix opening URL's with non-http schemes [#3153]
- Fix data loss due to not reading all database attachments if duplicates exist [#3180]
- Fix entry context menu disabling when using keyboard navigation [#3199]
- Fix behaviors when canceling an entry edit [#3199]
- Fix processing of tray icon click and doubleclick [#3112]
- Update group in preview widget when focused [#3199]
- Prefer DuckDuckGo service over direct icon download (increases resolution) [#2996]
- Remove apply button in application settings [#3019]
- Use winqtdeploy on Windows to correct deployment issues [#3025]
- Don't mark entry edit as modified when attribute selection changes [#3041]
- Use console code page CP_UTF8 on Windows if supported [#3050]
- Snap: Fix locking database with session lock [#3046]
- Snap: Fix theming across Linux distributions [#3057]
- Snap: Use SNAP_USER_COMMON and SNAP_USER_DATA directories [#3131]
- KeeShare: Automatically enable WITH_XC_KEESHARE_SECURE if quazip is found [#3088]
- macOS: Fix toolbar text when in dark mode [#2998]
- macOS: Lock database on switching user [#3097]
- macOS: Fix global Auto-Type when the database is locked [#3138]
- Browser: Close popups when database is locked [#3093]
- Browser: Add tests [#3016]
- Browser: Don't create default group if custom group is enabled [#3127]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants