keepassxreboot / keepassxc

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

Option to not minimize after auto-type #3457

Open stingray21 opened 5 years ago

stingray21 commented 5 years ago

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:

Cryptographic libraries: libgcrypt 1.8.4

zoomorph commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 4 years ago

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

auwsom commented 4 years ago

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 commented 4 years ago

@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 commented 4 years ago

Hi Jonathan,

Fair enough, thanks for showing you're aware of this issue. Its not a big one now that I have Lock on Minimize turned off (although it was nice having the visual indicator the DB was locked when the window was not visible). A more important one to me is being able to preview DB sync changes or differences, as can be done in OG KP.

Appreciate the work that you've done and do. Will probably edit that comment to be better. So many tools I use are designed poorly and worse have no real channel for feedback. Sorry if that spilled over here.

So do you use exit on minimize? And autotype? Do you see the value of being able to use both? Well, I guess its on the roadmap in the future milestones.

On Wed, Jun 3, 2020, 5:15 AM Jonathan White notifications@github.com wrote:

@auwsom https://github.com/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.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/keepassxreboot/keepassxc/issues/3457#issuecomment-638157789, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF7OL3C4LU5PH3Y2VTXMN5LRUY5EVANCNFSM4INSNPFQ .

auwsom commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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

auwsom commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

I'm a little confused by that message.. you say KPXC 'however' does minimize on both, meaning that OGKP does not? I just tested again KP2 on Kubuntu and it does minimize. I'm assuming it does the same on Windows, but was asking to confirm. I read the first part of your message to mean it does not use tab switching, until I get to the word 'however'..

So are you saying OG KP does not minimize on autotype usage on Windows or Linux?

In that case, this would add support that the least assuming action by KP was and should be to simply switch tabs, so that the window doesn't need to be restored from the tab bar or tray.

On Mon, Jun 15, 2020, 10:42 PM Tomatenjoghurt notifications@github.com wrote:

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).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/keepassxreboot/keepassxc/issues/3457#issuecomment-644543249, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF7OL3BFEF3OQNFS5V54L3DRW4A4JANCNFSM4INSNPFQ .

Tomatenjoghurt commented 4 years ago

@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 commented 4 years ago

Hi and thanks.

Since Minimize after Autotype was not on the original KP using WIndows for which it was originally designed for, I would repeat my assertion: this adds support that the least assuming (and therefore most flexible/powerful) action by KP was and should be to simply switch tabs after Autotype, so that the window doesn't need to be restored from the tab bar or tray.

On Tue, Jun 16, 2020 at 10:00 PM Tomatenjoghurt notifications@github.com wrote:

@auwsom https://github.com/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.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/keepassxreboot/keepassxc/issues/3457#issuecomment-645151197, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF7OL3AL222X7U7FOQSUJJTRXBEXJANCNFSM4INSNPFQ .

brianmercer commented 4 years ago

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 commented 4 years ago

+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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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

damaltor commented 4 years ago

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 commented 4 years ago

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 commented 2 years ago

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 commented 2 years ago

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.

phoerious commented 2 years ago

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

climb-on commented 1 year ago

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 commented 1 year ago

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.

damaltor commented 1 year ago

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 commented 1 year ago

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

damaltor commented 1 year ago

Oh, great. I did not know that.

christian-reiter-sbm commented 11 months ago

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

AurelienBISOTTI commented 11 months ago

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.

cwoelkers commented 6 months ago

While not minimizing would be nice how about instead of an option to do that there is an option to automatically restore(un-minimize) the window instead. I would see it working like this. You start the auto-type, KeePassXC minimizes, auto-type does it's thing, the KeePassXC window is restored to its pre-minimized size and location.

damaltor commented 6 months ago

Should work, too. I just would like to have a way to have KPXC open after autotyping. On one screen, minimizing and un-minimizing should work fine.

cate02 commented 3 months ago

all these years of yapping yet still no dont-minimize after auto-type 😭