mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Fix Auto-Typing single character placeholders
* 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).
This commit is contained in:
parent
c5d25ac371
commit
097be1a5cd
@ -72,19 +72,20 @@ namespace
|
||||
{"multiply", Qt::Key_Asterisk},
|
||||
{"divide", Qt::Key_Slash},
|
||||
{"leftbrace", Qt::Key_BraceLeft},
|
||||
{"{", Qt::Key_BraceLeft},
|
||||
{"{", Qt::Key_unknown},
|
||||
{"rightbrace", Qt::Key_BraceRight},
|
||||
{"}", Qt::Key_BraceRight},
|
||||
{"}", Qt::Key_unknown},
|
||||
{"leftparen", Qt::Key_ParenLeft},
|
||||
{"(", Qt::Key_ParenLeft},
|
||||
{"(", Qt::Key_unknown},
|
||||
{"rightparen", Qt::Key_ParenRight},
|
||||
{")", Qt::Key_ParenRight},
|
||||
{"[", Qt::Key_BracketLeft},
|
||||
{"]", Qt::Key_BracketRight},
|
||||
{"+", Qt::Key_Plus},
|
||||
{"%", Qt::Key_Percent},
|
||||
{"^", Qt::Key_AsciiCircum},
|
||||
{"~", Qt::Key_AsciiTilde},
|
||||
{")", Qt::Key_unknown},
|
||||
{"[", Qt::Key_unknown},
|
||||
{"]", Qt::Key_unknown},
|
||||
{"+", Qt::Key_unknown},
|
||||
{"%", Qt::Key_unknown},
|
||||
{"^", Qt::Key_unknown},
|
||||
{"~", Qt::Key_unknown},
|
||||
{"#", Qt::Key_unknown},
|
||||
{"numpad0", Qt::Key_0},
|
||||
{"numpad1", Qt::Key_1},
|
||||
{"numpad2", Qt::Key_2},
|
||||
@ -612,7 +613,12 @@ AutoType::parseSequence(const QString& entrySequence, const Entry* entry, QStrin
|
||||
error = tr("Too many repetitions detected, max is %1: %2").arg(maxRepetition).arg(fullPlaceholder);
|
||||
return {};
|
||||
}
|
||||
auto action = QSharedPointer<AutoTypeKey>::create(g_placeholderToKey[placeholder], modifiers);
|
||||
QSharedPointer<AutoTypeKey> action;
|
||||
if (g_placeholderToKey[placeholder] == Qt::Key_unknown) {
|
||||
action = QSharedPointer<AutoTypeKey>::create(placeholder[0], modifiers);
|
||||
} else {
|
||||
action = QSharedPointer<AutoTypeKey>::create(g_placeholderToKey[placeholder], modifiers);
|
||||
}
|
||||
for (int i = 1; i <= repeat && i <= maxRepetition; ++i) {
|
||||
actions << action;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user