Add more granular Auto-Type confirmation settings (#12370)

This new setting gives users more control and safety:

* When Auto-Type is invoked globally (e.g., via a system-wide hotkey), the confirmation popup will always appear, letting the user confirm which credentials will be auto-typed.
* When Auto-Type is invoked from within KeePassXC's main window, the confirmation step can be skipped, since the user already can visually confirm which entry is being auto-typed.

This balances usability and security, reducing friction for intended actions while providing an extra safeguard for potentially ambiguous global Auto-Type triggers.

---------

Co-authored-by: Jonathan White <[email protected]>
This commit is contained in:
Juzu-OandJonathan White authored and GitHub committed 2025-08-09 22:36:51 -04:00
1 parent 93423eda30
commit 448165613d
7 files changed
+67 -6

No files matched your search

+12
View File
@@ -129,6 +129,8 @@ ApplicationSettingsWidget::ApplicationSettingsWidget(QWidget* parent)
connect(m_generalUi->backupFilePathPicker, SIGNAL(pressed()), SLOT(selectBackupDirectory()));
connect(m_generalUi->showExpiredEntriesOnDatabaseUnlockCheckBox, SIGNAL(toggled(bool)),
SLOT(showExpiredEntriesOnDatabaseUnlockToggled(bool)));
connect(m_generalUi->autoTypeAskCheckBox, SIGNAL(toggled(bool)),
SLOT(autoTypeAskToggled(bool)));
connect(m_secUi->clearClipboardCheckBox, SIGNAL(toggled(bool)),
m_secUi->clearClipboardSpinBox, SLOT(setEnabled(bool)));
@@ -302,6 +304,9 @@ void ApplicationSettingsWidget::loadSettings()
showExpiredEntriesOnDatabaseUnlockToggled(m_generalUi->showExpiredEntriesOnDatabaseUnlockCheckBox->isChecked());
m_generalUi->autoTypeAskCheckBox->setChecked(config()->get(Config::Security_AutoTypeAsk).toBool());
m_generalUi->autoTypeSkipMainWindowConfirmationCheckBox->setChecked(
config()->get(Config::Security_AutoTypeSkipMainWindowConfirmation).toBool());
autoTypeAskToggled(m_generalUi->autoTypeAskCheckBox->isChecked());
m_generalUi->autoTypeRelockDatabaseCheckBox->setChecked(config()->get(Config::Security_RelockAutoType).toBool());
if (autoType()->isAvailable()) {
@@ -445,6 +450,8 @@ void ApplicationSettingsWidget::saveSettings()
m_generalUi->showExpiredEntriesOnDatabaseUnlockOffsetSpinBox->value());
config()->set(Config::Security_AutoTypeAsk, m_generalUi->autoTypeAskCheckBox->isChecked());
config()->set(Config::Security_AutoTypeSkipMainWindowConfirmation,
m_generalUi->autoTypeSkipMainWindowConfirmationCheckBox->isChecked());
config()->set(Config::Security_RelockAutoType, m_generalUi->autoTypeRelockDatabaseCheckBox->isChecked());
if (autoType()->isAvailable()) {
@@ -618,6 +625,11 @@ void ApplicationSettingsWidget::showExpiredEntriesOnDatabaseUnlockToggled(bool c
m_generalUi->showExpiredEntriesOnDatabaseUnlockOffsetSpinBox->setEnabled(checked);
}
void ApplicationSettingsWidget::autoTypeAskToggled(bool checked)
{
m_generalUi->autoTypeSkipMainWindowConfirmationCheckBox->setEnabled(checked);
}
void ApplicationSettingsWidget::selectBackupDirectory()
{
auto backupDirectory =