mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-25 22:16:01 -05:00
Introduce security option to enable copy on doubleclick (#6433)
* Fix #1575 - option is disabled by default
This commit is contained in:
parent
5c709f0da3
commit
7b7f52c8af
BIN
docs/images/enable_copy_dc.png
Normal file
BIN
docs/images/enable_copy_dc.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 53 KiB |
@ -46,6 +46,14 @@ For users with smaller screens or those who desire seeing more entries at once,
|
||||
.Compact mode comparison
|
||||
image::compact_mode_comparison.png[]
|
||||
|
||||
==== Copy entry Columns on Double Click
|
||||
KeePassXC offers the possibility of copying certain entry columns, such as username and password, into your clipboard on double click, for a limited period of time.
|
||||
|
||||
This feature can be enabled by checking the box "Enable double click to copy some entry columns" in the security settings:
|
||||
|
||||
.Enable copying on double click
|
||||
image::enable_copy_dc.png[]
|
||||
|
||||
=== Keyboard Shortcuts
|
||||
include::KeyboardShortcuts.adoc[tag=content, leveloffset=+1]
|
||||
|
||||
|
@ -140,6 +140,7 @@ static const QHash<Config::ConfigKey, ConfigDirective> configStrings = {
|
||||
{Config::Security_ResetTouchIdTimeout, {QS("Security/ResetTouchIdTimeout"), Roaming, 30}},
|
||||
{Config::Security_ResetTouchIdScreenlock,{QS("Security/ResetTouchIdScreenlock"), Roaming, true}},
|
||||
{Config::Security_NoConfirmMoveEntryToRecycleBin,{QS("Security/NoConfirmMoveEntryToRecycleBin"), Roaming, true}},
|
||||
{Config::Security_EnableCopyOnDoubleClick,{QS("Security/EnableCopyOnDoubleClick"), Roaming, false}},
|
||||
|
||||
// Browser
|
||||
{Config::Browser_Enabled, {QS("Browser/Enabled"), Roaming, false}},
|
||||
|
@ -121,6 +121,7 @@ public:
|
||||
Security_ResetTouchIdTimeout,
|
||||
Security_ResetTouchIdScreenlock,
|
||||
Security_NoConfirmMoveEntryToRecycleBin,
|
||||
Security_EnableCopyOnDoubleClick,
|
||||
|
||||
Browser_Enabled,
|
||||
Browser_ShowNotification,
|
||||
|
@ -286,6 +286,8 @@ void ApplicationSettingsWidget::loadSettings()
|
||||
m_secUi->hideNotesCheckBox->setChecked(config()->get(Config::Security_HideNotes).toBool());
|
||||
m_secUi->NoConfirmMoveEntryToRecycleBinCheckBox->setChecked(
|
||||
config()->get(Config::Security_NoConfirmMoveEntryToRecycleBin).toBool());
|
||||
m_secUi->EnableCopyOnDoubleClickCheckBox->setChecked(
|
||||
config()->get(Config::Security_EnableCopyOnDoubleClick).toBool());
|
||||
|
||||
m_secUi->touchIDResetCheckBox->setChecked(config()->get(Config::Security_ResetTouchId).toBool());
|
||||
m_secUi->touchIDResetSpinBox->setValue(config()->get(Config::Security_ResetTouchIdTimeout).toInt());
|
||||
@ -387,6 +389,7 @@ void ApplicationSettingsWidget::saveSettings()
|
||||
config()->set(Config::Security_HideNotes, m_secUi->hideNotesCheckBox->isChecked());
|
||||
config()->set(Config::Security_NoConfirmMoveEntryToRecycleBin,
|
||||
m_secUi->NoConfirmMoveEntryToRecycleBinCheckBox->isChecked());
|
||||
config()->set(Config::Security_EnableCopyOnDoubleClick, m_secUi->EnableCopyOnDoubleClickCheckBox->isChecked());
|
||||
|
||||
config()->set(Config::Security_ResetTouchId, m_secUi->touchIDResetCheckBox->isChecked());
|
||||
config()->set(Config::Security_ResetTouchIdTimeout, m_secUi->touchIDResetSpinBox->value());
|
||||
|
@ -264,6 +264,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="EnableCopyOnDoubleClickCheckBox">
|
||||
<property name="text">
|
||||
<string>Enable double click to copy the username/password entry columns</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -1195,10 +1195,18 @@ void DatabaseWidget::entryActivationSignalReceived(Entry* entry, EntryModel::Mod
|
||||
// Implement 'copy-on-doubleclick' functionality for certain columns
|
||||
switch (column) {
|
||||
case EntryModel::Username:
|
||||
setClipboardTextAndMinimize(entry->resolveMultiplePlaceholders(entry->username()));
|
||||
if (config()->get(Config::Security_EnableCopyOnDoubleClick).toBool()) {
|
||||
setClipboardTextAndMinimize(entry->resolveMultiplePlaceholders(entry->username()));
|
||||
} else {
|
||||
switchToEntryEdit(entry);
|
||||
}
|
||||
break;
|
||||
case EntryModel::Password:
|
||||
setClipboardTextAndMinimize(entry->resolveMultiplePlaceholders(entry->password()));
|
||||
if (config()->get(Config::Security_EnableCopyOnDoubleClick).toBool()) {
|
||||
setClipboardTextAndMinimize(entry->resolveMultiplePlaceholders(entry->password()));
|
||||
} else {
|
||||
switchToEntryEdit(entry);
|
||||
}
|
||||
break;
|
||||
case EntryModel::Url:
|
||||
if (!entry->url().isEmpty()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user