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

Option to not minimize after auto-type #3457

Open
stingray21 opened this issue Aug 20, 2019 · 34 comments
Open

Option to not minimize after auto-type #3457

stingray21 opened this issue Aug 20, 2019 · 34 comments

Comments

@stingray21
Copy link
Contributor

stingray21 commented Aug 20, 2019

Expected Behavior

When KeepassXC is not minimized and auto-type is performed, KeepassXC should remain open (not minimized)

Current Behavior

KeepassXC minimizes after auto-type

Possible Solution

Add option in settings for auto-type, like the one for copying ("Minimize when copying to clipboard")

Steps to Reproduce

  1. KeepassXC is not minimized
  2. auto-type (key-binding or button)

Context

Debug Info

KeePassXC - Version 2.4.3
Revision: 5d6ef0c

Qt 5.13.0
Debugging mode is disabled.

Operating system: Manjaro Linux
CPU architecture: x86_64
Kernel: linux 5.1.21-1-MANJARO

Enabled extensions:

  • Auto-Type
  • Browser Integration
  • SSH Agent
  • KeeShare (signed and unsigned sharing)
  • YubiKey

Cryptographic libraries:
libgcrypt 1.8.4

@stingray21 stingray21 added the bug label Aug 20, 2019
@zoomorph
Copy link

Should be an option not to minimize after auto-type. Otherwise database is locked every time you auto-type, if you have enabled the option to lock on minimize.

@amkuchta
Copy link

I second this - if I am logging into a few different sites at once (which happens really frequently), I don't want to have to re-open the KeePassXC window each time. I use the browser integration, when available, but for some sites, the URL changes after the initial navigation and cannot be tracked by KeePassXC.

@irgendsontyp
Copy link

The KeePassXC window has to be hidden in order to bring the destination window to front, right?

Would the solution here be to re-show the main window when auto type has been done?

@tsdmgz
Copy link

tsdmgz commented Nov 2, 2019

macos behavior was, if on full screen, was to send a cmd+tab and then autotype without minimizing (probably a side effect of being in its own desktop). that said i'm fine with bringing the window up again when autotype is done.

either that, or making it as an option?

@jrobert-gh
Copy link

I also vote for this, for reasons already stated. Thanks.

@droidmonkey droidmonkey modified the milestones: v2.6.0, v2.6.1 May 30, 2020
@auwsom
Copy link

auwsom commented Jun 3, 2020

My cynicism suspects most of the devs use macs, and as was stated dont have this problem. So much for being able to conveniently minimize to close the db. Unset that setting if you want to be able to use autotype and dont want to enter in your password again everytime after hunting for the window to restore.

@droidmonkey
Copy link
Member

@auwsom I use a fancy Dell running Windows 10... which I use to make this project even possible for you to use in the first place.

@auwsom
Copy link

auwsom commented Jun 3, 2020 via email

@auwsom
Copy link

auwsom commented Jun 3, 2020

Also, curious if KPXC considered using QtSharp to port over existing KP using mono on Unix-based OSes? It seems like that would have avoided the 'regular KP can, why cant KPXC' issues.. if it was available when this project began. Mono does seem to run well.

@droidmonkey
Copy link
Member

droidmonkey commented Jun 3, 2020

Lock on minimize also impacts copying to clipboard (tracked in #1090). I generally do not recommend having that setting enabled at all, it is overly agressive for most use cases. You would be far better off setting a shorter lock after inactivity time.

We will never allow KeePass plugins to interface with KPXC or port over any KeePass code.

@auwsom
Copy link

auwsom commented Jun 3, 2020

Jonathan, thanks again.. (I didnt mention plugins.. the OG KP can show you duplicate passwords which allows you to manually delete one of two 'conflicting' entries, if the DB has been edited in different locations, say on Android and on PC. This allows the conflicts to be resolved transparently without a 'brute-force' and 'black-box' sync. No plugin required. This especially useful with a PWD MGR because the DB would have to be exported to use regular comparison tools and then imported back again.)

..I did edit a reply above that you might not have seen saying the value in using Lock on Minimize is having 'visual indicator the DB was locked when the window was not visible'.. it is a tangible way to always know if the DB is unlocked or not (a color change on the taskbar or systray icon would do the same, may be difficult cross-platform though, but maybe not with Qt).

re #1090, I guess thats another reason why I always keep the window visible when Im jockeying into different accounts, usually on browser restart. Sometimes I'll even edit an entry with a space character just to prevent the DB from autolocking after 20 min, if Im upgrading a bunch of passwords or something. The whole time I know that as soon as I click Apply or Cancel and then use a gesture to fling the KP window to the tray, the DB will be locked and safe.. Whereas as long as I see a corner of the window in the background, I know its still unlocked. Visual confirmation is always more robust than a timeout setting IMO. And honestly, I'm not sure why anyone expects a password to stay in the clipboard after the DB is locked, that seems like a security hole. The underlying problem seems to start with the conflict of Autotype Minimize and Lock on Minimize. The simplest resolution seems to be to use AltTab to switch windows instead of minimize, as it is assuming the least about the intentions of the user (ie, that they want the window minimized). As other posters above report, it is a hassle to unminimize, at least in _ubuntu, because usually the minimized windows are not included in AltTab switching, and forces user to hunt for the taskbar icon to click (ie more carpel tunnel for every Autotype)..

@droidmonkey
Copy link
Member

FWIW, we do show a different taskbar icon when the databases are locked.

@auwsom
Copy link

auwsom commented Jun 3, 2020

hmm.. no color change on Kubuntu 18.10.

Also, to be fair, it looks like the AutoType Minimize behavior is inherited from the OG KP. Again maybe a Windows thing, as I never used to use AutoType in Windows, do people AltTab back to KP to use it again?

@Tomatenjoghurt
Copy link

Tomatenjoghurt commented Jun 16, 2020

Also, to be fair, it looks like the AutoType Minimize behavior is inherited from the OG KP. Again maybe a Windows thing, as I never used to use AutoType in Windows, do people AltTab back to KP to use it again?

Nope, OG Keepass does exactly the same when run on Linux with Mono. Used OG Keepass for work with Windows for a long time now and can confirm, that it does not behave like this on Windows. Keepass XC, however, minimizes on Windows and Linux (Mint).

@auwsom
Copy link

auwsom commented Jun 16, 2020 via email

@Tomatenjoghurt
Copy link

@auwsom Sorry, maybe I was unclear or mixing up stuff.
Yes, on Linux Keepass 2 does minimize. I always believed this is due to the autotype implementation on Linux (as you need to install xdotool).
On Windows Keepass 2 does not minimize.

Keepass XC minimizes on Linux and Windows.

@auwsom
Copy link

auwsom commented Jun 17, 2020 via email

@droidmonkey droidmonkey modified the milestones: v2.6.1, v2.7.0 Aug 21, 2020
@brianmercer
Copy link

There is already an option for minimize, drop to background, or do nothing when copying to clipboard.

It would be nice to have a similar option to drop to background on auto-type instead of minimize.

@damaltor
Copy link

+1 for this. I use KeePassXC on two PCs which have two monitors, both PCs have to be logged in in the morning into multiple services, which means that i have to reopen the window multiple times. Also, some sites allow only entering of the email and entering of the password on a second page, so that is two reopens for one login. putting a long delay between username and password would maybe be an option, but is not very reproducible. i could simply hold KeePassXC open on the second monitor, and login one ofter another, i would not need the minimize function and would like to disable it.
Browser integration is nice, but as said earlier, is not always working.

also, for compatibility reasons, it might be easier to minimize, auto-type, and reopen.

@phoerious
Copy link
Member

phoerious commented Oct 19, 2020

TBH, I am not even sure if this even possible. On some systems we may be able to raise foreign windows, but current Auto-Type relies a lot on the order in which your system activates the next window when ours is minimised or hidden. Perhaps it's possible to move ourselves to the bottom of the stack without minimising the window, but I'm not entirely certain about that.

@damaltor
Copy link

Hmm as long as the program is still running, i dont know why it should not work. it could minimize, autotype, and un-minimize after that, just like any other program that is minimized and wants your attention. alternatively, defocusing the program might work as well, and refocusing would be possible too.

@droidmonkey
Copy link
Member

It sounds easy, until you implement it and realize every OS has a unique problem that prevents you from being 100% successful....

@damaltor
Copy link

I know, i know, i am a software developer myself. Still, this would be a nice feature, and as minimizing already is implemented, reopening should not be that far of a stretch - at least i hope so. activating the other window is handled by the operating system anyway, i think. I really hope that that is not a huge thing to implement - at least it sounds kinda simple, though i learned in my years that "sounds simple" not always means "is simple to implement" :)

@droidmonkey
Copy link
Member

I don't think this will be a big deal, although we have seen elsewhere where the window is not given focus again correctly. This is certainly easy to turn on, then we'll have to test it

@Caralluin
Copy link

This would especially be useful for "special" auto type-actions (only username or password) - I find those quite useful for special cases e.g. when changing a password, but then you usually have to re-type the new password, so you need to switch back again.

It would also feel consistent to have the same settings as for the copy-behaviour (although I see, that implementation is quite more difficult to get platform-independent).

@droidmonkey
Copy link
Member

This is much less an issue with the new Auto-Type dialog in 2.7.0. You can press ctrl+1 or 2 to type username and password, respectively.

@droidmonkey droidmonkey added this to the v2.7.1 milestone Mar 21, 2022
@droidmonkey droidmonkey self-assigned this Mar 21, 2022
@phoerious phoerious modified the milestones: v2.7.1, v2.7.2 Apr 12, 2022
@phoerious
Copy link
Member

I think this is to difficult and unsafe to implement and with the new Auto-Type dialog it's pretty much a non-issue.

@phoerious phoerious closed this as not planned Won't fix, can't repro, duplicate, stale Oct 17, 2022
@phoerious phoerious removed this from Auto-Type in Release 2.8.0 Oct 17, 2022
@phoerious phoerious removed this from the v2.7.2 milestone Oct 17, 2022
@climb-on
Copy link

climb-on commented Apr 9, 2023

I don't understand at all why this would be unsafe. And for me it's definitely an annoyance.

I'm running KeePassXC 2.7.4 on Mac OS X 10.15.7. I like to keep KeePassXC open - often on a second monitor. Typically I use Shift-Cmd-U to open a new browser window, and then when I'm sure I am at the login page, I use Shift-Cmd-V to login. When I do this, KeePassXC minimizes, which is not what I want. I'd rather keep it open so I can open and login to additional websites. I realize there are other ways to use KeePassXC that might obviate the need for this, but is there anything wrong with using it this way?

Seems like it would be very easy to add a preference "Don't minimize after auto-type" and I can't see why this would be unsafe.

My request would be to reopen this as a feature request, or let me know if I'm using the tool in an unsafe way.

Thanks.

@droidmonkey droidmonkey reopened this Apr 9, 2023
@droidmonkey
Copy link
Member

There is a potential that the OS could ignore our request for the target window to be in focus. I guess the user can deal with that problem when this feature is enabled.

@droidmonkey droidmonkey added this to the v2.8.0 milestone Apr 9, 2023
@damaltor
Copy link

damaltor commented Apr 9, 2023

That would really be great. Thanks for reopening.
Also, if the os would ignore the target window in focus, the credentials would be typed into keepassxc in the worst case, wouldn't it? That would be weird, but not very unsafe, I guess. It would probably be unsafe if the os brings a different window in focus, but that could happen on minimizing keepassxc as well.

@droidmonkey
Copy link
Member

We have a fail safe that prevents typing into the keepassxc window

@damaltor
Copy link

damaltor commented Apr 9, 2023

Oh, great. I did not know that.

@christian-reiter-sbm
Copy link

I vote for this. Would be great to have this feature.

@AurelienBISOTTI
Copy link

AurelienBISOTTI commented Dec 15, 2023

Any update on this ?

I had to fight against Ubuntu to find and disable "tile groups" that was messing with the window focus, just to find there is a non-disablable and by default auto-minimize after auto-typing in KeepassXC.

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

No branches or pull requests