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

Major improvements to Auto-Type #5864

Merged
merged 6 commits into from
Feb 23, 2021
Merged

Conversation

droidmonkey
Copy link
Member

@droidmonkey droidmonkey commented Dec 24, 2020

TODO:

  • Add documentation for T-CONV and T-REPLACE-RX
  • Add documentation for new Auto-Type select dialog

Screenshots

New Auto-Type Select Dialog
image

Showing database search
image

Drop down menu, same as context menu
image

Drop down menu for entry-level Auto-Type
image

Entry-level confirmation dialog
image

Pickchars Dialog (short password)
image

Pickchars Dialog (long password)
image

Testing strategy

Tested across all three platforms.
Added test cases for new features.

Type of change

  • ✅ New feature (change that adds functionality)
  • ✅ Refactor (significant modification to existing code)

@droidmonkey
Copy link
Member Author

Documentation has been updated, ready for review.

@@ -31,26 +31,9 @@ To configure Auto-Type sequences for your entries, perform the following steps:
.Auto-Type entry sequences
image::autotype_entry_sequences.png[]

2. _(Optional)_ Define a custom auto-type sequence for each window title match by selecting the _Use specific sequence for this association_ checkbox. Sequence action codes and field placeholders are detailed in the following table. A complete list of supported actions and placeholders can be found at https://keepass.info/help/base/autotype.html#autoseq[KeePass Auto-Type Action Codes] and https://keepass.info/help/base/placeholders.html[KeePass Placeholders]. Action codes and placeholders are not case sensitive.
2. _(Optional)_ Define a custom auto-type sequence for each window title match by selecting the _Use specific sequence for this association_ checkbox. Sequence action codes and field placeholders are detailed in the following table. A complete list of supported actions and placeholders can be found at https://keepass.info/help/base/autotype.html#autoseq[KeePass Auto-Type Action Codes, window=_blank] and https://keepass.info/help/base/placeholders.html[KeePass Placeholders, window=_blank]. Action codes and placeholders are not case sensitive.
Copy link
Member

Choose a reason for hiding this comment

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

We capitalise Auto-Type.

case-sensitive with hyphen.

Linking to KeePass for documentation for how KeePassXC works is also kind of ridiculous.

Copy link
Member Author

@droidmonkey droidmonkey Feb 13, 2021

Choose a reason for hiding this comment

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

Why reinvent the documentation wheel? There are a ton of useless placeholders that are defined and not relevant to 99.9% of users. I don't want to clutter our documentation with those, let them live in KeePass' documentation. Our documentation contains the essentials, I updated the verbiage to reflect that.

Copy link
Member

Choose a reason for hiding this comment

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

The documentation should be self-contained. It could go into an extended section or something, but our documentation should include everything we implement, useless or not.

Copy link
Member

Choose a reason for hiding this comment

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

Indeed, we can't skimp on documentation and we can't assume an internet connection is available.

Copy link
Member Author

Choose a reason for hiding this comment

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

OK, I added a "References" section to the UserGuide and moved all the extensive, technical bits into this section. I removed the external links to keepass.info and replaced with internal links within the UserGuide.

src/autotype/AutoType.cpp Show resolved Hide resolved
src/autotype/AutoType.cpp Outdated Show resolved Hide resolved
src/autotype/AutoType.cpp Outdated Show resolved Hide resolved
src/autotype/AutoType.cpp Outdated Show resolved Hide resolved
src/autotype/PickcharsDialog.cpp Outdated Show resolved Hide resolved
src/autotype/PickcharsDialog.h Outdated Show resolved Hide resolved
src/core/Entry.cpp Outdated Show resolved Hide resolved
src/gui/entry/EditEntryWidget.cpp Outdated Show resolved Hide resolved
src/gui/entry/EditEntryWidget.cpp Outdated Show resolved Hide resolved
@droidmonkey droidmonkey force-pushed the feature/autotype-upgrade-part2 branch from 7b8a5b0 to cfdfcd0 Compare February 14, 2021 03:17
@droidmonkey
Copy link
Member Author

Made an additional improvement, when an Auto-Type sequence has an error in it you will be warned and the Auto-Type will be canceled:

image

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.

I gave it a rough re-review. Most of the changes look good to me. I unresolved two discussions where I am still a bit sceptical about the solution. One other thing is that Cmd+Shift+V is still broken on macOS, since you are only targeting the top-level menu item and not the one that actually performs the action.

Other than that, this is probably good to go and needs time testing.

* Show the sequence that will be typed when performing the default action
* Combine default sequence action with Username / Password options
* Fix #4939 - confirm prior to performing entry level auto-type if "Always Ask Before Auto-Type" is enabled
Significant improvements to the Auto-Type select dialog. Reduce stale and unnecessary code paths.

* Close select dialog when databases are locked.
* Close open modal dialogs prior to showing the Auto-Type select dialog to prevent interference.
* Never perform Auto-Type on the KeePassXC window.
* Only filter match list based on Group, Title, and Username column data (ie, ignore sequence column)
* Always show the sequence column (revert feature)
* Show selection dialog if there are no matches to allow for a database search

* Close #3630 - Allow typing {USERNAME} and {PASSWORD} from selection dialog (right-click menu).
* Close #429 - Ability to search open databases for an entry from the Auto-Type selection dialog.
* Fix #5361 - Default size of selection dialog doesn't cut off matches
* Close #2603 - Add support for modifier syntax (+, ^, and %)
* Fix #2633 - Allow reference syntax {REF:...} in Auto-Type sequences
* Close #5334  - Tell the user which part of the Auto-Type sequence is invalid for easy correction
* Fix #2401 - Select the right window on macOS prior to starting Auto-Type

* Allow for nested placeholders
@droidmonkey droidmonkey force-pushed the feature/autotype-upgrade-part2 branch from 438b22a to 42cbd40 Compare February 22, 2021 04:37
@droidmonkey
Copy link
Member Author

Final changes are completed.

* Closes #725

Support Auto-Type {PICKCHARS} placeholder. Open a dialog that lets you pick characters of an entry's password by their position. Supports typing {TAB} in between characters to move between fields (if necessary). Also supports using arrow keys to quickly navigate around the choice grid.
* Close #1825 - Add full support for T-CONV and T-REPLACE-RX placeholders. Exception is support for the "raw" type in T-CONV.

* Close #5333 - Allow comment syntax to be present in the Auto-Type sequence
* Improve documentation and remove external links to keepass.info documentation
@droidmonkey droidmonkey force-pushed the feature/autotype-upgrade-part2 branch from 42cbd40 to 8d058cb Compare February 22, 2021 12:41
@droidmonkey droidmonkey merged commit c0d673b into develop Feb 23, 2021
@droidmonkey droidmonkey deleted the feature/autotype-upgrade-part2 branch February 23, 2021 00:05
@ccoenen
Copy link

ccoenen commented Feb 23, 2021

Can I navigate this dropdown by keyboard? (i.e. does it have a shortcut itself?) It should be possible to never leave the keyboard for this (and without any larger amount of tab mashing).

For example, can I do a auto-type, then up/down to choose the right entry, then (for example) Alt+S to open the sequence dropdown, use up/down to select the desired sequence, Enter to send that selected sequence to the application waiting for it?

Of course, any other short keyboard-only way would also be fine.

@ccoenen
Copy link

ccoenen commented Feb 23, 2021

Two other keyboard-only workflows were also described here: #3630 (comment)

I don't care much which one works, as long as there is a keyboard-only way with very few keystrokes.

@droidmonkey
Copy link
Member Author

The dialog is totally keyboard accessible but does not include the shortcuts linked

@wereia
Copy link

wereia commented Feb 27, 2021

@droidmonkey

Just want to write down an idea I had reading this thread.

What about to show the window target/title were AT is performed in the 'Entry-level confirmation dialog' ?

Might be nice to know the target? But it's just a nice to have and possible that it's not a good idea because of other reasons or too time consuming to implement.

@droidmonkey
Copy link
Member Author

I wanted to do that, but we need to keep an internal track of which window was last active. I saved that for a future enhancement.

@paddylandau
Copy link

I have a situation where I need Shift+Tab, because the website in question places tick-boxes after the login button (which would otherwise register when pressing {ENTER}).

The further complication is that login takes place over three screens, so my Auto-Type has a complex entry with a couple of {DELAY n} statements. The part where I need Shift+Tab is on the second of those three screens.

(I know that websites do this multi-screen login in order to reduce bot-style hacking, but it's still a pain!)

Is there any way that I can implement Shift+Tab before this request has been implemented?

Thank you

@droidmonkey
Copy link
Member Author

Use a snapshot build from https://snapshot.keepassxc.org

@paddylandau
Copy link

@droidmonkey

Use a snapshot build from https://snapshot.keepassxc.org

Thank you, Jonathan.

I confirm that +{TAB} to indicate Shift+Tab works.

I don't wish to use the unstable version, so do you have a timescale of when this is likely to be released, please? Or, can I subscribe to some sort of automatic notification for this?

Thank you

@droidmonkey
Copy link
Member Author

By the end of this month we'll have a release candidate ready. I wouldn't call it unstable, i use a develop build as my daily driver just fine for the past 6 months.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment