When I press the global auto-type hotkey while the database is locked, the keepass app is brought to the front so I can unlock it. But when it is unlocked and focus switches back to the original window, it tabs before typing, typically resulting in the username being typed in place of the password.
If the database is already unlocked there is no issue, and the auto-type works as it should, this only happens if the database is locked from the start.
Is there an option I need to check somewhere or something else I can do?
EDIT: To anyone finding this with the same issue, my solution was simply to override the auto-type sequence with "{TAB}+{TAB}{USERNAME}{TAB}{PASSWORD}{ENTER}"
Last edit: Svend 2021-06-11
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you can't find a keystroke sequence that works in both situations you can either reposition the cursor while the database is unlocking or add a short delay to the beginning of the keystroke sequence. This delay will give you more time to reposition the cursor before the auto-type sequence begins sending keystrokes, e.g., {DELAY 2000} will produce a 2-second delay,
Alternatively, create separate keystroke sequences for each situation. When you press the global auto-type hotkey (default hotkey Ctrl+Alt+A) the Auto-Type Entry Selection dialog will appear so that you can pick the correct sequence. Note: If the focus change is causing the cursor shift, then it is likely that the same keystroke sequence will work for both situations because the Auto-Type Entry Selection also produces a focus shift. In that case, the second auto-type can be a dummy custom auto-type sequence having the sole purpose of forcing the Auto-Type Entry Selection dialog to appear for that website.
If neither solution works for you post a link to the website.
Last edit: wellread1 2021-06-10
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ah, yeah you got it. I was misunderstanding what was happening, this particular application does indeed remove the cursor from the username field when the focus changes, but a tab then "moves" the cursor to the password field. Perhaps I can do a sort of tab-backtab at the beginning.
In any case, thank you both for the answers.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When I press the global auto-type hotkey while the database is locked, the keepass app is brought to the front so I can unlock it. But when it is unlocked and focus switches back to the original window, it tabs before typing, typically resulting in the username being typed in place of the password.
If the database is already unlocked there is no issue, and the auto-type works as it should, this only happens if the database is locked from the start.
Is there an option I need to check somewhere or something else I can do?
EDIT: To anyone finding this with the same issue, my solution was simply to override the auto-type sequence with "{TAB}+{TAB}{USERNAME}{TAB}{PASSWORD}{ENTER}"
Last edit: Svend 2021-06-11
If you can't find a keystroke sequence that works in both situations you can either reposition the cursor while the database is unlocking or add a short delay to the beginning of the keystroke sequence. This delay will give you more time to reposition the cursor before the auto-type sequence begins sending keystrokes, e.g., {DELAY 2000} will produce a 2-second delay,
Alternatively, create separate keystroke sequences for each situation. When you press the global auto-type hotkey (default hotkey Ctrl+Alt+A) the Auto-Type Entry Selection dialog will appear so that you can pick the correct sequence. Note: If the focus change is causing the cursor shift, then it is likely that the same keystroke sequence will work for both situations because the Auto-Type Entry Selection also produces a focus shift. In that case, the second auto-type can be a dummy custom auto-type sequence having the sole purpose of forcing the Auto-Type Entry Selection dialog to appear for that website.
If neither solution works for you post a link to the website.
Last edit: wellread1 2021-06-10
This is unlikely to be a KeePass issue.
Place the cursor in the username field.
Switch to another application.
Switch back.
Is the cursor still in the username field?
cheers, Paul
Ah, yeah you got it. I was misunderstanding what was happening, this particular application does indeed remove the cursor from the username field when the focus changes, but a tab then "moves" the cursor to the password field. Perhaps I can do a sort of tab-backtab at the beginning.
In any case, thank you both for the answers.