Keepassxc: Add {COPY:field} to Auto-Type tokens to copy named field to clipboard

Created on 20 Aug 2018  路  15Comments  路  Source: keepassxreboot/keepassxc

Expected Behavior

KeepassXC should (optionally) not minimize after auto type (discussed at https://sourceforge.net/p/keepass/discussion/329221/thread/fd0e9e5a/) The people at that time (2013) thought that there was no further need for Keepass after auto-type.

Current Behavior

KeepassXC minimizes after autotype

Possible Solution

Have a setting under Tools > settings > General > Basic

Context

I often have to copy the TOPT after auto type. I would also love to be able to double click and copy TOTP like the user name and passwords, but can live with the rightclick > Time-based one time passwords > copy OTP or Show OTP, but the window minimizing all the time does gets irritating. Different users have different work flows and at times, I may have to have 3 to 4 logins within 10min. So, an option to prevent or enable minimize after auto-type may be useful for some users (like me).

Debug Info

KeePassXC - Version 2.3.3
Revision: 0a155d8

Libraries:

  • Qt 5.10.1
  • libgcrypt 1.8.2

Operating system: Windows 10 (10.0)
CPU architecture: x86_64
Kernel: winnt 10.0.17134

Enabled extensions:

  • Auto-Type
  • Browser Integration
  • Legacy Browser Integration (KeePassHTTP)
  • SSH Agent
  • YubiKey
Auto-Type wontfix

Most helpful comment

How about {COPY:field}

All 15 comments

I think a better solution, since OTP are getting very popular, is to create an AutoType global keyboard shortcut specifically for the TOTP typing.

@droidmonkey - that would be good to have. It was brought up in #1892.

I cannot find the issue, but I came across one yesterday where people strongly felt that storing the OTP secret in the same database as username and password defeats the purpose. Using 2 database on the phone version of the app would be a nightmare. Moreover, someone even thought of the KeepassXC DB as just a backup store for the secret.

The fact is that you need to minimize KeePassXC in order to send keystrokes to the target application, after that you need to re-invoke the KeePassXC window.

This has some issue if you disable the auto-enter autotype shortcut (sending automatically {ENTER} after every autotype sequence.

The best thing is adding a shortcut to minimize/maximize the KeePassXC window.

Expected Behaviour:

1) Press Autotype shortcut
1) Autotype is performed
1) Press enter if needed
1) Press Minimize/Maximize shortcut
1) Copy and paste TOTP

Okay. So it is a limitation.

Are there reasons that makes a double click copy of OTP a bad idea? How about an option to put the TOTP (if it exists) into the clipboard on clicking auto-type?

I actually like your proposal and we should make an autotype sequence keyword for it.

Something like {USERNAME}{TAB}{PASSWORD}{ENTER}{TO-CLIP:TOTP}

TO-CLIP is the main token and after the : you can place any entry field (also custom field with typical syntax S:field)

How about {COPY:field}

I like the COPY token

Looks like this has turned into a new "Enhancement" request. Should a new issue be created?

@TheZ3ro @droidmonkey - This is too far ahead but, should you implement {COPY:}, do you propose to clear the clipboard as a part of {COPY:} or something like {COPY:}{DELAY 30000}{CLEAR-CLIP}? Perhaps it dose not matter as TOTPs are useless after 30sec anyway.

We would use the configured clipboard clearing time. It would be incumbent on the user to configure their autotype correctly to incorporate delays and such. We can keep this same issue to track the enhancement, I changed the title.

The {COPY:field} is such a great idea !
Sometimes you found a website where the password field is unreachable by "TAB", so filling the clipboard with the password is a good way to mitigate the problem. (You still have to click on the field with the mouse and paste it, of course)

{USERNAME}{TAB}{PASSWORD}{ENTER}{TO-CLIP:TOTP}

That's the functionality I want (I don't care if it's TO-CLIP or COPY or whatever).

We do support the {TOTP} placeholder

Yes, but I want it into the clipboard because often the TOTP has to be put into next web page, some variable number of seconds later.

You can also add {DELAY 2000} to add a 2 second delay. Just some workarounds while this is open.

I decided not to implement this feature. The revamped Auto-Type select dialog now includes the ability Auto-Type or copy to clipboard the username, password, or totp of an entry. We do not encourage the use of the clipboard and embedding that into Auto-Type defeats the purpose of Auto-Type.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MisterY picture MisterY  路  3Comments

mstarke picture mstarke  路  3Comments

813gan picture 813gan  路  3Comments

shyim picture shyim  路  3Comments

shaneknysh picture shaneknysh  路  3Comments