From 4ecd9e7e230ed2eba6f4ddd4fafde6c1aaae78c1 Mon Sep 17 00:00:00 2001 From: Toni Spets Date: Wed, 28 Jun 2017 18:01:21 +0300 Subject: [PATCH] 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. --- src/autotype/AutoType.cpp | 2 +- src/autotype/mac/AutoTypeMac.cpp | 2 -- src/autotype/windows/AutoTypeWindows.cpp | 2 -- src/autotype/xcb/AutoTypeXCB.cpp | 2 -- 4 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/autotype/AutoType.cpp b/src/autotype/AutoType.cpp index 927d6822..4a86409a 100644 --- a/src/autotype/AutoType.cpp +++ b/src/autotype/AutoType.cpp @@ -317,7 +317,7 @@ bool AutoType::parseActions(const QString& sequence, const Entry* entry, QListsendChar(action->character, true); m_platform->sendChar(action->character, false); - usleep(25 * 1000); } void AutoTypeExecutorMac::execKey(AutoTypeKey* action) { m_platform->sendKey(action->key, true); m_platform->sendKey(action->key, false); - usleep(25 * 1000); } void AutoTypeExecutorMac::execClearField(AutoTypeClearField* action = nullptr) diff --git a/src/autotype/windows/AutoTypeWindows.cpp b/src/autotype/windows/AutoTypeWindows.cpp index 2dfc7a26..3ff2343b 100644 --- a/src/autotype/windows/AutoTypeWindows.cpp +++ b/src/autotype/windows/AutoTypeWindows.cpp @@ -522,14 +522,12 @@ void AutoTypeExecutorWin::execChar(AutoTypeChar* action) { m_platform->sendChar(action->character, true); m_platform->sendChar(action->character, false); - ::Sleep(25); } void AutoTypeExecutorWin::execKey(AutoTypeKey* action) { m_platform->sendKey(action->key, true); m_platform->sendKey(action->key, false); - ::Sleep(25); } void AutoTypeExecutorWin::execClearField(AutoTypeClearField* action = nullptr) diff --git a/src/autotype/xcb/AutoTypeXCB.cpp b/src/autotype/xcb/AutoTypeXCB.cpp index 436cd5b5..5ec62f0e 100644 --- a/src/autotype/xcb/AutoTypeXCB.cpp +++ b/src/autotype/xcb/AutoTypeXCB.cpp @@ -849,13 +849,11 @@ AutoTypeExecutorX11::AutoTypeExecutorX11(AutoTypePlatformX11* platform) void AutoTypeExecutorX11::execChar(AutoTypeChar* action) { m_platform->SendKeyPressedEvent(m_platform->charToKeySym(action->character)); - Tools::wait(25); } void AutoTypeExecutorX11::execKey(AutoTypeKey* action) { m_platform->SendKeyPressedEvent(m_platform->keyToKeySym(action->key)); - Tools::wait(25); } void AutoTypeExecutorX11::execClearField(AutoTypeClearField* action = nullptr)