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

Allow to select entry if window not found on auto-type #429

Closed
azrdev opened this issue Mar 23, 2017 · 45 comments · Fixed by #5864
Closed

Allow to select entry if window not found on auto-type #429

azrdev opened this issue Mar 23, 2017 · 45 comments · Fixed by #5864

Comments

@azrdev
Copy link

azrdev commented Mar 23, 2017

This is a feature request.

Expected Behavior

  1. Select a window for which no auto-type is configured
  2. Press the global auto-type shortcut
  3. (optionally: unlock your database)
  4. Select an entry in your database to be auto-typed

Current Behavior

instead of 4. there is a warning message like "could not find an entry with matching window title", which can only be dismissed with "OK".

Possible Solutions

  • open the main window, to select an entry. however, if selecting would instantly auto-type, this could be unexpected to the user (especially if the window doesn't differ at all from the normal window)
  • open a dialog with the entry-tree. this could get huge & messy, though
  • open a search/filter box, displaying matching entries as you type in a dropdown list. So you'd e.g. type git, which displays entries for github and gitlab, then use the arrow keys to select the one you want, then press enter to select & auto-type it.

Your Environment

  • KeePassXC version/commit used: 2.1.2 b9279f7 from packages
  • Qt version 5.8.0
  • Operating System and version: archlinux
@schiorean
Copy link

I like this proposal. I have several websites that I work on and have the same user/password to all of them. This way I can have the same credentials in the same entry.

@TheZ3ro
Copy link
Contributor

TheZ3ro commented Mar 28, 2017

@schiorean Alternatively you can consider using #370 that is merged in develop

@schiorean
Copy link

schiorean commented Mar 28, 2017

Thanks will check it. When will #370 be released officially?

EDIT: I still think it's a good idea to have the possibility to choose if no entry found.

@phoerious
Copy link
Member

We don't have a release schedule for 2.2.0 yet.

@mihaiile
Copy link

mihaiile commented Apr 3, 2017

I really think this feature is very important, since many websites have the GENIUS idea to name their login pages "Login" or "Sign-in". And there goes auto-type. Fantastic!

To keep things simple I would just show the select entry dialog as if it found an entry but without any entry and have a search field which provides the search text instead of window title.
So all code is same I would say except the search text comes from search field instead of window title.

@TheZ3ro
Copy link
Contributor

TheZ3ro commented Apr 3, 2017

I think I'm starting to like this, with an option in the settings the "Select Entry Dialog" will show every entry in the database with autotype enabled and letting user search and select an entry.

In some database there will be lot of entry with autotype enabled but the search feature can help.

@jeroenev
Copy link

any updates on this?
keeweb's desktop client already does this, would be great if it was added to keepassxc

@kneitinger
Copy link
Contributor

Is this being worked on by anyone? If not, I would love to start on it this week.

@kneitinger
Copy link
Contributor

Right now, I have the autotype dialog showing all entries if there are no matches, and I'm about to get started on the search functionality. I was wondering if it would be okay to also add the search to the regular autotype entry select dialog if it is tasteful and non-intrusive? That way, each case can use the same widget.

Also, would you be okay with a checkbox in the widget (for when its shown with the all entries mode) that says something like "Create autotype association for '${WINDOW_TITLE}' in selected entry"? Or, this could instead be a dialog: "Create autotype association for '${WINDOW_TITLE}' in ${ENTRY}? [Yes] [No]"

@droidmonkey
Copy link
Member

Yes please reduce variability. You can and should reuse the search widget and entry searcher

@keckelt
Copy link

keckelt commented Dec 18, 2018

Any updates @kneitinger ?

@kneitinger
Copy link
Contributor

kneitinger commented Dec 18, 2018

@keckelt Coming along 🙂

I have a basic mechanism working, but there are still a few tasks left for it, as well as cleaning up the solution.

2018-12-18_08-35-34_search

@kneitinger
Copy link
Contributor

Sorry for this work stalling out for a month, holidays followed by my workplace getting acquired led to an interesting and busy month. Picking this back up now 👍

@zeteref
Copy link

zeteref commented Mar 6, 2019

any good news @kneitinger ?

@kneitinger
Copy link
Contributor

@zeteref It's going well! I just performance tested it on a 2000 entry database. Populating the window and searching were both perceptually instant 🙂. Also, I've unconditionally added the search to the AutoTypeSelectDialog, so even if matches were found for your window, you can still search through them if you'd like.

@droidmonkey since you've worked quite extensively on the EntrySearcher, I have a question for you. Currently, the EntrySearcher does not search through auto type sequences, which makes total sense when searching in the database tab. I was wondering what your thoughts are on adding AutoTypeSequences as a Field that is optionally searchable...

The use case I see for this is enabling very quick keyboard usage in the autotype select window. Imagine the case where you're trying to log in to Gmail... sometimes it asks for username/pw, sometimes username/pw/otp, sometimes just pw, and sometimes pw/otp.

Imagine for this window title, the matching entry/sequences are:

GMail - {USERNAME}{ENTER}{PASSWORD}{ENTER}
GMail - {PASSWORD}{ENTER}
GMail - {TOTP}{ENTER}

GMail asks for username (and obv password), then after that it decided it was feeling an OTP today. The user can very quickly do:
(Assume the global autotype shortcut is Alt+K)

Alt+K
U
S
E
Enter
Alt+K
O
T
P
Enter

without having to read the entries very carefully.

One way I can see this happening non-obtrusively is to have a default setting where existing searches avoid autotype sequences, with the setting being changed via an optional constructor param:

EntrySearcher(bool caseSensitive = false, bool searchAutoTypeSeqs = false);

How do you feel about that?

@droidmonkey
Copy link
Member

You can just add Auto-Type as a search field (eg, autotype:"sequence")

@zeteref
Copy link

zeteref commented Mar 21, 2019

@kneitinger sounds great - and addition of searching through auto type sequences is making this feature even more usefull. Can't wait to test it!

@kneitinger
Copy link
Contributor

Happy to hear that! Functionally, I'm quite happy with it, and now I'm working on usability/UX of it, mainly in the context of reasonable and useful keyboard interaction.

What I'm going for is:

  • Window opens with cursor in search bar
  • Any typing fills in the search
  • Up/Down arrow keys navigate through the results window
  • Enter executes selected entry/sequence
  • Escape closes window.

It's close, but there are a couple of those cases that aren't quite right yet.

@zeteref
Copy link

zeteref commented Mar 22, 2019

seems reasonable.
I'm very curious as to the results - if you want and your changes are public i'll be happy to test it ;)

@LJPapenfort
Copy link

This is the only feature which keeps me from changing to keepassxc.
Any news @kneitinger?

@droidmonkey
Copy link
Member

This feature is easily overcome by just defining window associations with the entries. You can use wildcards to make matching more forgiving.

@LJPapenfort
Copy link

While this is true for the given use case above, what about auto-typing e.g. in the terminal? It is nice to have a filterable list coming up from where one can choose the right entry. Or other non-simple to distinguish windows.
Sure, I could put for every possible password which could become useful at some point a general wildcard, but that doesn't seem to be very flexible to me.

@ccoenen
Copy link

ccoenen commented Aug 23, 2020

For me the ideal workflow (which not even Keepass supports afaik) is:
...

  • Ctrl-Alt-Shift-A don't even attempt auto-fill, just pop up the search box. This would be useful for when I already know it won't find a match automatically, or don't want to risk a false match.

-- @gregzaal

no, KeePass uses Ctrl+Alt+Shift+A differently; they only auto-type the password in this case. Please don't use that same shortcut for something different.

@LJPapenfort
Copy link

For me the ideal workflow (which not even Keepass supports afaik) is:

* `Ctrl-Alt-A` to attempt auto-fill, if no match is found, pop up a search box to manually select an entry from the DB. Once selected, auto-fill that entry.

* `Ctrl-Alt-Shift-A` don't even attempt auto-fill, just pop up the search box. This would be useful for when I already know it won't find a match automatically, or don't want to risk a false match.

I'm doing exactly this with the AutoTypeSearch plugin in keepass2, in my case it's Ctrl-Alt-S and gives exactly the desired functionality. So it would be awesome to get this build-in into keepassxc.

@droidmonkey
Copy link
Member

I like this idea

@droidmonkey droidmonkey self-assigned this Aug 31, 2020
@droidmonkey droidmonkey added this to the v2.7.0 milestone Aug 31, 2020
droidmonkey added a commit that referenced this issue Nov 9, 2020
* Close #3630 - Allow typing {USERNAME} and {PASSWORD} from selection dialog.
* Close #429 - Ability to search open databases for an entry from the Auto-Type selection dialog.
droidmonkey added a commit that referenced this issue Nov 10, 2020
Significant improvements to the Auto-Type select dialog. Reduce stale and unnecessary code paths.

* Close select dialog when databases are locked.
* Only filter based on Group, Title, and Username column data
* Always show the sequence column (revert feature)

* 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.
droidmonkey added a commit that referenced this issue Nov 11, 2020
Significant improvements to the Auto-Type select dialog. Reduce stale and unnecessary code paths.

* Close select dialog when databases are locked.
* Only filter based on Group, Title, and Username column data
* Always show the sequence column (revert feature)

* 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.
droidmonkey added a commit that referenced this issue Nov 11, 2020
Significant improvements to the Auto-Type select dialog. Reduce stale and unnecessary code paths.

* Close select dialog when databases are locked.
* Only filter based on Group, Title, and Username column data
* Always show the sequence column (revert feature)

* 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.
droidmonkey added a commit that referenced this issue Nov 15, 2020
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.
droidmonkey added a commit that referenced this issue Nov 15, 2020
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.
droidmonkey added a commit that referenced this issue Nov 15, 2020
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.
droidmonkey added a commit that referenced this issue Dec 2, 2020
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
droidmonkey added a commit that referenced this issue Dec 3, 2020
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
droidmonkey added a commit that referenced this issue Dec 17, 2020
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
droidmonkey added a commit that referenced this issue Dec 24, 2020
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
droidmonkey added a commit that referenced this issue Dec 26, 2020
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
droidmonkey added a commit that referenced this issue Feb 14, 2021
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
droidmonkey added a commit that referenced this issue Feb 15, 2021
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
droidmonkey added a commit that referenced this issue Feb 22, 2021
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
libklein pushed a commit to libklein/keepassxc that referenced this issue Mar 1, 2021
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 keepassxreboot#3630 - Allow typing {USERNAME} and {PASSWORD} from selection dialog (right-click menu).
* Close keepassxreboot#429 - Ability to search open databases for an entry from the Auto-Type selection dialog.
* Fix keepassxreboot#5361 - Default size of selection dialog doesn't cut off matches
@gregzaal
Copy link

gregzaal commented May 5, 2021

I'm not sure this is working as intended - just tested 2.6.4 and I'm still not getting any search popup when auto type fails:

2021-05-05_13-25-29_notepad

@droidmonkey
Copy link
Member

Check out the milestone for this feature

@gregzaal
Copy link

gregzaal commented May 5, 2021

Maybe I'm blind but I don't see anything that specifically mentions this problem, do you have a link?

@droidmonkey
Copy link
Member

This isn't being released until version 2.7.0

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

Successfully merging a pull request may close this issue.