Add auto-type {CLEARFIELD}#427
Add auto-type {CLEARFIELD}#427droidmonkey merged 11 commits intokeepassxreboot:developfrom weslly:feature/autotype-clearfield
Conversation
|
This is ready for review. |
|
Keepass uses |
|
@rockihack I'm not sure about windows, but OSX uses ⌘+A as the standard to the "Select all" action in any layout, including non-latin input methods such as japanese or korean. Also, the home and end keys don't work the same way in many apps since they aren't even available in most mac keyboards. |
|
@rockihack Also, it seems Windows uses the same virtual keycode values for any layout, so it wouldn't make any difference with other layouts, I just tested with AZERTY and it didn't. But I agree we should probably change it to |
|
On linux with AZERTY layout I can reproduce @rockihack bug. |
To be compatible with keepass you should use |
src/autotype/mac/AutoTypeMac.cpp
Outdated
|
|
||
| m_platform->sendKey(Qt::Key_Control, true, true); | ||
| m_platform->sendKey(Qt::Key_A, true, true); | ||
| m_platform->sendKey(Qt::Key_Control, false, true); |
There was a problem hiding this comment.
You should press and release keys in inverse order.
There was a problem hiding this comment.
Yes, but look at the event type FlagsChanged.
What does it show for the clear field sequence?
There was a problem hiding this comment.
There was a problem hiding this comment.
Actually it could be the way I usually type, I release the modifier key before releasing the character key. Not sure if it's how most people do or not...
There was a problem hiding this comment.
I'll change it to be like the example
I think this is the best alternative |
|
Unless the goal is 100% compatibility with Keepass 2.x, I think we should support multi-line edits, like |
I agree but also we should support multiple keyboard layout, and |
|
|
| event.keycode = keycode; | ||
| SendEvent(&event, KeyPress); | ||
| SendEvent(&event, KeyRelease); | ||
| if (isKeyDown) { |
There was a problem hiding this comment.
With this change, modifiers will be pressed and released for each key event.
Instead of modifing the code here, you can use SendEvent and SendModifier directly in execClearField.
| m_platform->sendKey(Qt::Key_Down, true, Qt::ShiftModifier | Qt::ControlModifier); | ||
| m_platform->sendKey(Qt::Key_Down, false, Qt::ShiftModifier | Qt::ControlModifier); | ||
| m_platform->sendKey(Qt::Key_Control, false, Qt::ShiftModifier); | ||
| m_platform->sendKey(Qt::Key_Shift, false); |
There was a problem hiding this comment.
Can someone explain this key sequence to me?
There was a problem hiding this comment.
- Command Up - Move the cursor to the beginning of the field
- Shift Command Down - Select the text between the cursor and the end of the field
- Delete - Delete the selection
- Added YubiKey 2FA integration for unlocking databases [#127] - Added TOTP support [#519] - Added CSV import tool [#146, #490] - Added KeePassXC CLI tool [#254] - Added diceware password generator [#373] - Added support for entry references [#370, #378] - Added support for Twofish encryption [#167] - Enabled DEP and ASLR for in-memory protection [#371] - Enabled single instance mode [#510] - Enabled portable mode [#645] - Enabled database lock on screensaver and session lock [#545] - Redesigned welcome screen with common features and recent databases [#292] - Multiple updates to search behavior [#168, #213, #374, #471, #603, #654] - Added auto-type fields {CLEARFIELD}, {SPACE}, {{}, {}} [#267, #427, #480] - Fixed auto-type errors on Linux [#550] - Prompt user prior to executing a cmd:// URL [#235] - Entry attributes can be protected (hidden) [#220] - Added extended ascii to password generator [#538] - Added new database icon to toolbar [#289] - Added context menu entry to empty recycle bin in databases [#520] - Added "apply" button to entry and group edit windows [#624] - Added macOS tray icon and enabled minimize on close [#583] - Fixed issues with unclean shutdowns [#170, #580] - Changed keyboard shortcut to create new database to CTRL+SHIFT+N [#515] - Compare window title to entry URLs [#556] - Implemented inline error messages [#162] - Ignore group expansion and other minor changes when making database "dirty" [#464] - Updated license and copyright information on souce files [#632] - Added contributors list to about dialog [#629]


closes #426
Description
This PR add support for the auto-type
{CLEARFIELD}command.Progress
Types of changes
Checklist:
-DWITH_ASAN=ON. [REQUIRED]