keepassxreboot / keepassxc

KeePassXC is a cross-platform community-driven port of the Windows application “Keepass Password Safe”.
https://keepassxc.org/
Other
21.48k stars 1.48k forks source link

Only perform Entry Level Auto-Type when the focus was changed in the last X seconds #6205

Open wereia opened 3 years ago

wereia commented 3 years ago

Summary

For clipboard data there is a timer to delete it. What about to do something similar for the last focus Auto-Type?

The idea is to perform Entry Level Auto-Type only when there was a focus change in the last X seconds. To prevent outdated last focus targets.

Example:

The time should be settable like for the clipboard. When it's prevented due to timeout, the user will see a short notification that the action was prevented due to timeout.

The result: You can be sure that nothing will happen, unless you explicitly changed the focus very recently to a location were you really want to perform Entry Level Auto-Type. I think this would reduce a lot of accidental cases already, were you already forgot the last focused window or don't intended to use it as a target.

Context

Dear KXC team, I hope you don't mind that I write down a lot of ideas in the last days. I really enjoy KXC and heavily test it atm, resulting in some afterthought.

Even though we will see the confirm dialog in v2.7 that will be a great enhancement, I still thinking about what could be done on the UX side to prevent human error as much as possible. I see it similar to the challenges you have when you build the controls for a plane.

I think also about cases were a user might not want to use the confirm dialog.

droidmonkey commented 3 years ago

Not a fan of this feature, it can cause undiscoverable bugs (user thinks it's broken but it's just timed out). The changes made in #5864 prevent these issues in a user friendly way.

wereia commented 3 years ago

No problem, it's your decisions what works best.

That all said, I think the notification that Auto-Type was prevented by timeout should be enough that it's never seen as a bug by a user.

droidmonkey commented 3 years ago

I thought about this some more and it does make a lot of sense. Perhaps this can be coupled with the usage warning if "Always ask before Auto-Type" is disabled. If the timeout is reached then the confirmation dialog would show prior to performing the action. If the setting is enabled then the timeout doesn't apply since you can confirm the action.