Menu

#2753 APPACTIVATE does not work as expected / depends on two settings to work

KeePass_2.x
closed
nobody
5
2022-08-30
2020-08-11
Phil K.
No

Hi Dominik and KeePass contributors,

I'd like to point you towards a little bug regarding the APPACTIVATE Auto-Type placeholder.

this only works if the options "Cancel auto-type when the target window changes" and "Cancel auto-type when the target window title changes" are turned off (under Options > Advanced > Auto-Type Sending).

User MD004 described this behaviour in this forum post and I can confirm with KeePass 2.45 running on Win10. He suggests that this settings should be overridden by the APPACTIVATE placeholder.
This would also be my preferred solution. The easier alternative would probably be to document the dependency on this documentation page.

Thanks for your effort and this awesome tool. Keep up the great work, it helps a great deal to make IT a safer :-)

Discussion

  • Sanitiy

    Sanitiy - 2022-08-27

    More specifically, StiEngineStd saves the window in focus at creation, and tests at every key input whether the current focus is identical. If not, it makes all key inputs from now on do nothing (but only key presses, some complex commands like AppActivate itself aren't affected as the auto-type itself isn't really terminated).

    So, all there is to do is let AppActivate update the window in focus saved in the StiEngineStd when called.
    Inversely, I think AppActivate should invalidate the state of StiEngineStd when it can't find the supposed window (as one can use it as a check to make sure that so far everything went as expected).

    An added bonus of this change is that AppActivate can now be used to handle pop-up windows which automatically take the focus (e.g. some legal dialog poping up after logging in which has to be accepted)

    I've implemented both these changes and put the changed files as attachment (the remaining files are identical to the source code published for 2.51.1)

     
  • Dominik Reichl

    Dominik Reichl - 2022-08-30
    • status: open --> closed
    • Priority: 4 --> 5
     
  • Dominik Reichl

    Dominik Reichl - 2022-08-30

    I've implemented these two things now:

    • The {APPACTIVATE ...} auto-type command now ignores the options 'Cancel auto-type when the target window changes' and 'Cancel auto-type when the target window title changes'.
    • If the specified window does not exist or cannot be focused, auto-type is aborted now.

    Here's the latest development snapshot for testing:
    https://keepass.info/filepool/KeePass_220830.zip

    Moving to closed feature requests.

    Thanks and best regards,
    Dominik

     
  • Dominik Reichl

    Dominik Reichl - 2022-08-30

    Ticket moved from /p/keepass/bugs/1984/

     

Log in to post a comment.

Auth0 Logo