From c5d25ac371fbc05610629a1d4beb39f39309dc13 Mon Sep 17 00:00:00 2001 From: Jonathan White Date: Wed, 23 Mar 2022 21:44:50 -0400 Subject: [PATCH] Fix Auto-Type modifiers on Windows Also add documentation on modifiers. * Fix #7626 --- docs/topics/AutoType.adoc | 12 ++++++++++++ docs/topics/Reference.adoc | 9 +++++++++ src/autotype/windows/AutoTypeWindows.cpp | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/docs/topics/AutoType.adoc b/docs/topics/AutoType.adoc index 62d2aef0f..836d2c7d1 100644 --- a/docs/topics/AutoType.adoc +++ b/docs/topics/AutoType.adoc @@ -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. diff --git a/docs/topics/Reference.adoc b/docs/topics/Reference.adoc index 666b846dc..c123befc4 100644 --- a/docs/topics/Reference.adoc +++ b/docs/topics/Reference.adoc @@ -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>/}` + diff --git a/src/autotype/windows/AutoTypeWindows.cpp b/src/autotype/windows/AutoTypeWindows.cpp index 3f816417d..a18ec2454 100644 --- a/src/autotype/windows/AutoTypeWindows.cpp +++ b/src/autotype/windows/AutoTypeWindows.cpp @@ -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);