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

Fix Auto-Type modifiers on Windows #7629

Merged
merged 2 commits into from
Apr 2, 2022
Merged

Conversation

droidmonkey
Copy link
Member

@droidmonkey droidmonkey commented Mar 24, 2022

Also add documentation on modifiers.

Testing strategy

Tested on Windows

Type of change

  • ✅ Bug fix (non-breaking change that fixes an issue)

@droidmonkey droidmonkey added bug platform: Windows feature: Auto-Type pr: backport pending Pull request yet to be backported to a previous release labels Mar 24, 2022
@droidmonkey droidmonkey added this to the v2.7.1 milestone Mar 24, 2022
@droidmonkey droidmonkey requested a review from hifi March 24, 2022 01:45
Also add documentation on modifiers.

* Fix #7626
* Fix #7743 - Include # in placeholder list
* This change fixes typing single character placeholders (escaped placeholders) on Windows. Previously we were sending these as raw key presses which didn't properly press Shift or other modifiers. Now they are sent as unicode characters unless in virtual mode (the expected behavior).
@droidmonkey droidmonkey force-pushed the hotfix/autotype-modifiers branch from e780555 to 91ebc7b Compare March 31, 2022 22:18
@droidmonkey droidmonkey requested a review from phoerious March 31, 2022 22:19
@codecov-commenter
Copy link

codecov-commenter commented Mar 31, 2022

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.29%. Comparing base (aca197a) to head (91ebc7b).
Report is 461 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7629      +/-   ##
===========================================
- Coverage    64.31%   64.29%   -0.02%     
===========================================
  Files          339      339              
  Lines        43450    43454       +4     
===========================================
- Hits         27943    27937       -6     
- Misses       15507    15517      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@droidmonkey droidmonkey merged commit 097be1a into develop Apr 2, 2022
@droidmonkey droidmonkey deleted the hotfix/autotype-modifiers branch April 2, 2022 16:51
@droidmonkey droidmonkey added pr: backported Pull request backported to previous release and removed pr: backport pending Pull request yet to be backported to a previous release labels Apr 6, 2022
@codonell
Copy link

codonell commented May 3, 2022

@droidmonkey Why are the existing ASCII sequences used for special charaters? This change in backwards incompatible with all existing auto-type sequences that might have +, ^, % and #, and indeed this breaks a significant number of my auto-type sequences.

@droidmonkey
Copy link
Member Author

Take that up with keepass, they chose this syntax not us.

@codonell
Copy link

codonell commented May 3, 2022

Take that up with keepass, they chose this syntax not us.

As a career implementer of POSIX and ISO C interfaces, I can certainly understand the "Because the standardizing organization said it was this way", thank you for answering my question. I see that "@" is the Windows Key (as modifier) (https://keepass.info/help/base/autotype.html) where is the specification for "#" to be used as Win/Cmd? I'm just trying to write a cleanup pass to export, process, and import my auto-type entries.

@droidmonkey
Copy link
Member Author

@ is only defined for keepass 1.x. We chose # for keepassxc to provide that capability since @ is way more common to be used in a sequence as a character and not a modifier.

@codonell
Copy link

codonell commented May 3, 2022

@ is only defined for keepass 1.x. We chose # for keepassxc to provide that capability since @ is way more common to be used in a sequence as a character and not a modifier.

Certainly, if you used @ it would break emails in auto-type sequences and require escaping, which is why I assume Keepass 2.x deprecated @ usage in auto-type, and switched to recommending VKEY.

Does the choice of # (special meaning for standard ASCII character) for keepassxc cause compatibility problems between keepass and keepassxc when it comes to sharing auto-type sequences?

How can # be used for @? Is # a single-key modifier? Are {VKEY 91 D}e{VKEY 91 U} and #e equivalent now?

So if I have #e in my keepass auto-type and I migrate it to keepassxc it will not be interpreted the same?

Is it possible to remove # from the special characters to avoid this incompatibility with upstream keepass?

@droidmonkey
Copy link
Member Author

droidmonkey commented May 3, 2022

We don't support the VKEY syntax, and no we aren't going to revert this feature. You should almost never Auto-Type raw characters, placeholders don't apply the modifier logic.

If you define a sequence using # to hold down the win key in keepassxc, you can easily define a second sequence that uses VKEY in keepass.

#e => WIN+E
{#}e => #e
@e => @e

@phoerious phoerious added pr: bugfix Pull request that fixes a bug and removed bug labels Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: Auto-Type platform: Windows pr: backported Pull request backported to previous release pr: bugfix Pull request that fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

{#} doesn't allow to use hash in Auto-Type sequence Auto-Type: modifier for WIN key not working
4 participants