Skip to content

Commit 2a58e74

Browse files
droidmonkeyt-h-e
authored andcommitted
Fix Auto-Type modifiers on Windows
Also add documentation on modifiers. * Fix keepassxreboot#7626
1 parent 9cc2fb5 commit 2a58e74

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

docs/topics/AutoType.adoc

+12
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,18 @@ image::autotype_entry_sequences.png[]
6868
|{PICKCHARS} |Pick specific password characters from a dialog
6969
|{MODE=VIRTUAL} |(Experimental) Use virtual key presses on Windows, useful for virtual machines
7070
|===
71+
+
72+
[grid=rows, frame=none, width=90%]
73+
|===
74+
|Modifier |Description
75+
76+
|+ |SHIFT
77+
|^ |CTRL
78+
|% |ALT
79+
|# |WIN/CMD
80+
|===
81+
82+
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.
7183

7284
=== Performing Global Auto-Type
7385
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.

docs/topics/Reference.adoc

+9
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,15 @@ Examples: +
8484
|{PICKCHARS} |Pick specific password characters from a dialog
8585
|===
8686

87+
[grid=rows, frame=none, width=90%]
88+
|===
89+
|Modifier |Description
90+
91+
|+ |SHIFT
92+
|^ |CTRL
93+
|% |ALT
94+
|# |WIN/CMD
95+
|===
8796
*Text Conversions:*
8897

8998
`{T-CONV:/<PLACEHOLDER>/<METHOD>/}` +

src/autotype/windows/AutoTypeWindows.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ AutoTypeAction::Result AutoTypeExecutorWin::execType(const AutoTypeKey* action)
297297
m_platform->setKeyState(action->key, true);
298298
m_platform->setKeyState(action->key, false);
299299
} else {
300-
if (mode == Mode::VIRTUAL) {
300+
if (mode == Mode::VIRTUAL || action->modifiers != Qt::NoModifier) {
301301
m_platform->sendCharVirtual(action->character);
302302
} else {
303303
m_platform->sendChar(action->character);

0 commit comments

Comments
 (0)