mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-10-11 04:58:31 -04:00
Configurable global autotype start delay
This commit is contained in:
parent
48295efe0d
commit
9ed2a74421
13 changed files with 47 additions and 35 deletions
|
@ -220,7 +220,7 @@ void AutoType::executeAutoTypeActions(const Entry* entry, QWidget* hideWindow, c
|
|||
#endif
|
||||
}
|
||||
|
||||
Tools::wait(m_plugin->initialTimeout());
|
||||
Tools::wait(qMax(100, config()->get("AutoTypeStartDelay", 500).toInt()));
|
||||
|
||||
if (!window) {
|
||||
window = m_plugin->activeWindow();
|
||||
|
@ -365,7 +365,7 @@ bool AutoType::parseActions(const QString& actionSequence, const Entry* entry, Q
|
|||
{
|
||||
QString tmpl;
|
||||
bool inTmpl = false;
|
||||
m_autoTypeDelay = config()->get("AutoTypeDelay").toInt();
|
||||
m_autoTypeDelay = qMax(config()->get("AutoTypeDelay").toInt(), 0);
|
||||
|
||||
QString sequence = actionSequence;
|
||||
sequence.replace("{{}", "{LEFTBRACE}");
|
||||
|
|
|
@ -33,7 +33,6 @@ public:
|
|||
virtual bool registerGlobalShortcut(Qt::Key key, Qt::KeyboardModifiers modifiers) = 0;
|
||||
virtual void unregisterGlobalShortcut(Qt::Key key, Qt::KeyboardModifiers modifiers) = 0;
|
||||
virtual int platformEventFilter(void* event) = 0;
|
||||
virtual int initialTimeout() = 0;
|
||||
virtual bool raiseWindow(WId window) = 0;
|
||||
virtual void unload() {}
|
||||
|
||||
|
|
|
@ -154,11 +154,6 @@ AutoTypeExecutor* AutoTypePlatformMac::createExecutor()
|
|||
return new AutoTypeExecutorMac(this);
|
||||
}
|
||||
|
||||
int AutoTypePlatformMac::initialTimeout()
|
||||
{
|
||||
return 500;
|
||||
}
|
||||
|
||||
//
|
||||
// Activate window by process id
|
||||
//
|
||||
|
|
|
@ -42,7 +42,6 @@ public:
|
|||
bool registerGlobalShortcut(Qt::Key key, Qt::KeyboardModifiers modifiers) override;
|
||||
void unregisterGlobalShortcut(Qt::Key key, Qt::KeyboardModifiers modifiers) override;
|
||||
int platformEventFilter(void* event) override;
|
||||
int initialTimeout() override;
|
||||
bool raiseWindow(WId pid) override;
|
||||
AutoTypeExecutor* createExecutor() override;
|
||||
|
||||
|
|
|
@ -103,11 +103,6 @@ void AutoTypePlatformTest::addActionKey(AutoTypeKey* action)
|
|||
m_actionChars.append(keyToString(action->key));
|
||||
}
|
||||
|
||||
int AutoTypePlatformTest::initialTimeout()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool AutoTypePlatformTest::raiseWindow(WId window)
|
||||
{
|
||||
Q_UNUSED(window);
|
||||
|
|
|
@ -42,7 +42,6 @@ public:
|
|||
bool registerGlobalShortcut(Qt::Key key, Qt::KeyboardModifiers modifiers) override;
|
||||
void unregisterGlobalShortcut(Qt::Key key, Qt::KeyboardModifiers modifiers) override;
|
||||
int platformEventFilter(void* event) override;
|
||||
int initialTimeout() override;
|
||||
bool raiseWindow(WId window) override;
|
||||
AutoTypeExecutor* createExecutor() override;
|
||||
|
||||
|
|
|
@ -109,11 +109,6 @@ AutoTypeExecutor* AutoTypePlatformWin::createExecutor()
|
|||
return new AutoTypeExecutorWin(this);
|
||||
}
|
||||
|
||||
int AutoTypePlatformWin::initialTimeout()
|
||||
{
|
||||
return 500;
|
||||
}
|
||||
|
||||
//
|
||||
// Set foreground window
|
||||
//
|
||||
|
|
|
@ -39,7 +39,6 @@ public:
|
|||
bool registerGlobalShortcut(Qt::Key key, Qt::KeyboardModifiers modifiers) override;
|
||||
void unregisterGlobalShortcut(Qt::Key key, Qt::KeyboardModifiers modifiers) override;
|
||||
int platformEventFilter(void* event) override;
|
||||
int initialTimeout() override;
|
||||
bool raiseWindow(WId window) override;
|
||||
AutoTypeExecutor* createExecutor() override;
|
||||
|
||||
|
|
|
@ -844,12 +844,6 @@ void AutoTypeExecutorX11::execClearField(AutoTypeClearField* action = nullptr)
|
|||
nanosleep(&ts, nullptr);
|
||||
}
|
||||
|
||||
|
||||
int AutoTypePlatformX11::initialTimeout()
|
||||
{
|
||||
return 500;
|
||||
}
|
||||
|
||||
bool AutoTypePlatformX11::raiseWindow(WId window)
|
||||
{
|
||||
if (m_atomNetActiveWindow == None) {
|
||||
|
|
|
@ -51,7 +51,6 @@ public:
|
|||
bool registerGlobalShortcut(Qt::Key key, Qt::KeyboardModifiers modifiers) override;
|
||||
void unregisterGlobalShortcut(Qt::Key key, Qt::KeyboardModifiers modifiers) override;
|
||||
int platformEventFilter(void* event) override;
|
||||
int initialTimeout() override;
|
||||
bool raiseWindow(WId window) override;
|
||||
AutoTypeExecutor* createExecutor() override;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue