mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Make default auto-type delay of 25ms overridable with {DELAY=X}
Additionally this fixes the increased delay when you had your own custom delay configured and it always added 25ms on top of it.
This commit is contained in:
parent
8a7de4408d
commit
4ecd9e7e23
@ -317,7 +317,7 @@ bool AutoType::parseActions(const QString& sequence, const Entry* entry, QList<A
|
|||||||
{
|
{
|
||||||
QString tmpl;
|
QString tmpl;
|
||||||
bool inTmpl = false;
|
bool inTmpl = false;
|
||||||
m_autoTypeDelay = 0;
|
m_autoTypeDelay = 25;
|
||||||
|
|
||||||
|
|
||||||
for (const QChar& ch : sequence) {
|
for (const QChar& ch : sequence) {
|
||||||
|
@ -499,14 +499,12 @@ void AutoTypeExecutorMac::execChar(AutoTypeChar* action)
|
|||||||
{
|
{
|
||||||
m_platform->sendChar(action->character, true);
|
m_platform->sendChar(action->character, true);
|
||||||
m_platform->sendChar(action->character, false);
|
m_platform->sendChar(action->character, false);
|
||||||
usleep(25 * 1000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AutoTypeExecutorMac::execKey(AutoTypeKey* action)
|
void AutoTypeExecutorMac::execKey(AutoTypeKey* action)
|
||||||
{
|
{
|
||||||
m_platform->sendKey(action->key, true);
|
m_platform->sendKey(action->key, true);
|
||||||
m_platform->sendKey(action->key, false);
|
m_platform->sendKey(action->key, false);
|
||||||
usleep(25 * 1000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AutoTypeExecutorMac::execClearField(AutoTypeClearField* action = nullptr)
|
void AutoTypeExecutorMac::execClearField(AutoTypeClearField* action = nullptr)
|
||||||
|
@ -522,14 +522,12 @@ void AutoTypeExecutorWin::execChar(AutoTypeChar* action)
|
|||||||
{
|
{
|
||||||
m_platform->sendChar(action->character, true);
|
m_platform->sendChar(action->character, true);
|
||||||
m_platform->sendChar(action->character, false);
|
m_platform->sendChar(action->character, false);
|
||||||
::Sleep(25);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AutoTypeExecutorWin::execKey(AutoTypeKey* action)
|
void AutoTypeExecutorWin::execKey(AutoTypeKey* action)
|
||||||
{
|
{
|
||||||
m_platform->sendKey(action->key, true);
|
m_platform->sendKey(action->key, true);
|
||||||
m_platform->sendKey(action->key, false);
|
m_platform->sendKey(action->key, false);
|
||||||
::Sleep(25);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AutoTypeExecutorWin::execClearField(AutoTypeClearField* action = nullptr)
|
void AutoTypeExecutorWin::execClearField(AutoTypeClearField* action = nullptr)
|
||||||
|
@ -849,13 +849,11 @@ AutoTypeExecutorX11::AutoTypeExecutorX11(AutoTypePlatformX11* platform)
|
|||||||
void AutoTypeExecutorX11::execChar(AutoTypeChar* action)
|
void AutoTypeExecutorX11::execChar(AutoTypeChar* action)
|
||||||
{
|
{
|
||||||
m_platform->SendKeyPressedEvent(m_platform->charToKeySym(action->character));
|
m_platform->SendKeyPressedEvent(m_platform->charToKeySym(action->character));
|
||||||
Tools::wait(25);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AutoTypeExecutorX11::execKey(AutoTypeKey* action)
|
void AutoTypeExecutorX11::execKey(AutoTypeKey* action)
|
||||||
{
|
{
|
||||||
m_platform->SendKeyPressedEvent(m_platform->keyToKeySym(action->key));
|
m_platform->SendKeyPressedEvent(m_platform->keyToKeySym(action->key));
|
||||||
Tools::wait(25);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AutoTypeExecutorX11::execClearField(AutoTypeClearField* action = nullptr)
|
void AutoTypeExecutorX11::execClearField(AutoTypeClearField* action = nullptr)
|
||||||
|
Loading…
Reference in New Issue
Block a user