Skip to content

Commit

Permalink
Fix Auto-Type modifiers on Windows
Browse files Browse the repository at this point in the history
Also add documentation on modifiers.

* Fix #7626
  • Loading branch information
droidmonkey committed Mar 31, 2022
1 parent aca197a commit bd09be4
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
12 changes: 12 additions & 0 deletions docs/topics/AutoType.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,18 @@ image::autotype_entry_sequences.png[]
|{PICKCHARS} |Pick specific password characters from a dialog
|{MODE=VIRTUAL} |(Experimental) Use virtual key presses on Windows, useful for virtual machines
|===
+
[grid=rows, frame=none, width=90%]
|===
|Modifier |Description

|+ |SHIFT
|^ |CTRL
|% |ALT
|# |WIN/CMD
|===

TIP: Use modifiers to hold down special keys before typing the next character. For example, to type *CTRL+SHIFT+D* use: `^+d`. This is useful if you need to activate certain actions in a program or on your desktop.

=== Performing Global Auto-Type
The global Auto-Type keyboard shortcut is used when you have focus on the window you want to type into. To make use of this feature, you must have previously configured an Auto-Type hotkey.
Expand Down
9 changes: 9 additions & 0 deletions docs/topics/Reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@ Examples: +
|{PICKCHARS} |Pick specific password characters from a dialog
|===

[grid=rows, frame=none, width=90%]
|===
|Modifier |Description

|+ |SHIFT
|^ |CTRL
|% |ALT
|# |WIN/CMD
|===
*Text Conversions:*

`{T-CONV:/<PLACEHOLDER>/<METHOD>/}` +
Expand Down
2 changes: 1 addition & 1 deletion src/autotype/windows/AutoTypeWindows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ AutoTypeAction::Result AutoTypeExecutorWin::execType(const AutoTypeKey* action)
m_platform->setKeyState(action->key, true);
m_platform->setKeyState(action->key, false);
} else {
if (mode == Mode::VIRTUAL) {
if (mode == Mode::VIRTUAL || action->modifiers != Qt::NoModifier) {
m_platform->sendCharVirtual(action->character);
} else {
m_platform->sendChar(action->character);
Expand Down

0 comments on commit bd09be4

Please sign in to comment.