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)

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).
@codecov-commenter
Copy link

codecov-commenter commented Mar 31, 2022

Codecov Report

Merging #7629 (91ebc7b) into develop (aca197a) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

@@             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     
Impacted Files Coverage Δ
src/autotype/AutoType.cpp 72.23% <100.00%> (+0.25%) ⬆️
...rc/fdosecrets/widgets/SettingsWidgetFdoSecrets.cpp 56.06% <0.00%> (-3.03%) ⬇️
src/fdosecrets/dbus/DBusMgr.cpp 52.20% <0.00%> (-1.47%) ⬇️
src/core/Entry.cpp 82.59% <0.00%> (+0.10%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aca197a...91ebc7b. Read the comment docs.

@droidmonkey droidmonkey merged commit 097be1a into develop Apr 2, 2022
@droidmonkey droidmonkey deleted the hotfix/autotype-modifiers branch April 2, 2022 16:51
@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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