Skip to content

Add URL double-click action option to Settings#12322

Merged
droidmonkey merged 4 commits intokeepassxreboot:developfrom
juzu-o:add-url-double-click-action-option
Nov 2, 2025
Merged

Add URL double-click action option to Settings#12322
droidmonkey merged 4 commits intokeepassxreboot:developfrom
juzu-o:add-url-double-click-action-option

Conversation

@juzu-o
Copy link
Copy Markdown
Contributor

@juzu-o juzu-o commented Jul 28, 2025

Description

This pull request adds an option in Application Settings to configure the double-click action for the URL field in the entry view. Instead of the previous "Open browser on double clicking URL field in entry view" checkbox, there is now a dropdown selector allowing users to choose the desired double-click action for the URL field:

  • Open in browser (default, preserves previous behavior)
  • Edit entry
  • Copy entry URL to clipboard (new)

This brings the URL field in line with the double-click behavior already available for username and password fields, allowing for a more consistent and customizable user experience.

Code changes include:

  • Replaced the Open browser on double clicking URL field in entry view checkbox in the Settings dialog with a dropdown menu to select the double-click action for the URL field.
  • Updated the settings UI and logic to support the new dropdown and persist the chosen option.
  • Refactored the double-click event handler for the URL field to perform the selected action.
  • Maintained backwards compatibility: the default is "Open in browser", so previous configurations are preserved unless the user changes the setting.
  • Updated relevant settings serialization, tests, and UI strings.

The feature was originally requested in #4717

AI Notice:
The majority of this code was written with the help of generative AI tools (GitHub Copilot / Claude Sonnet 4).


Screenshots

URL-double-click-action-settingsmenu

Testing strategy

  • Manual testing: verified that double-clicking the URL field performs the selected action (edit, open, copy).
  • Confirmed that existing double-click actions for username and password fields are unaffected.
  • Checked that the new setting persists after app restart.

Type of change

  • ✅ New feature (change that adds functionality)

Additional notes

Copilot AI review requested due to automatic review settings July 28, 2025 13:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a configurable double-click action option for the URL field in the entry view, replacing the previous binary checkbox with a dropdown selector that offers three actions: edit entry, open in browser, or copy to clipboard. This enhancement provides users with more flexibility and brings consistency with existing username and password field double-click behaviors.

Key changes:

  • Replaced boolean "Open browser on double clicking URL field" setting with a dropdown offering three actions
  • Added migration logic to preserve existing user preferences when upgrading
  • Updated the entry activation handler to support the new action types

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/core/Config.h Added new URLDoubleClickAction configuration key
src/core/Config.cpp Added configuration mapping and migration logic for the new setting
src/gui/ApplicationSettingsWidget.cpp Updated settings UI logic to use dropdown instead of checkbox
src/gui/ApplicationSettingsWidgetGeneral.ui Replaced checkbox with dropdown containing three action options
src/gui/DatabaseWidget.cpp Modified entry activation handler to support multiple URL double-click actions
tests/TestConfig.h Added test method declaration for migration testing
tests/TestConfig.cpp Implemented comprehensive migration tests for the new setting
Comments suppressed due to low confidence (1)

tests/TestConfig.cpp:52

  • [nitpick] Variable names 'oldConfig' and 'oldConfig2' are not descriptive. Consider using names like 'configWithOpenUrlTrue' and 'configWithOpenUrlFalse' to better indicate the test scenario.
    QSettings oldConfig(tempFile.fileName(), QSettings::IniFormat);

@droidmonkey droidmonkey added user interface ux pr: ai-assisted Pull request contains significant contributions by generative AI labels Jul 28, 2025

This comment was marked as outdated.

@juzu-o juzu-o force-pushed the add-url-double-click-action-option branch from 43b6cd2 to 0e2adfb Compare August 11, 2025 15:50
@juzu-o juzu-o requested a review from Copilot August 11, 2025 16:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a configurable double-click action for URL fields in the entry view, replacing a simple checkbox with a dropdown that offers three options: edit entry, open in browser, or copy to clipboard. This enhancement provides consistency with existing username and password field double-click behaviors while maintaining backward compatibility.

Key Changes:

  • Replaced boolean "Open browser on double clicking URL field" checkbox with a dropdown selector offering three actions
  • Implemented migration logic to preserve existing user preferences when upgrading
  • Updated the double-click handler to execute the selected action based on the new configuration

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/core/Config.h Added new URLDoubleClickAction configuration key
src/core/Config.cpp Added configuration directive and migration logic for the new setting
src/gui/ApplicationSettingsWidgetGeneral.ui Replaced checkbox with dropdown and label in settings UI
src/gui/ApplicationSettingsWidget.cpp Updated settings load/save logic to use dropdown instead of checkbox
src/gui/DatabaseWidget.cpp Modified URL double-click handler to support multiple actions based on configuration
tests/TestConfig.h Added test method declaration for migration testing
tests/TestConfig.cpp Implemented test cases for configuration migration

@droidmonkey droidmonkey force-pushed the add-url-double-click-action-option branch from 0e2adfb to f32703d Compare September 20, 2025 13:20
@droidmonkey
Copy link
Copy Markdown
Member

droidmonkey commented Sep 20, 2025

@juzu-o can you please cleanup your fork of the repository. All your per-commit tags end up getting pulled into my local repo when I work on your PR's.

image

@juzu-o
Copy link
Copy Markdown
Contributor Author

juzu-o commented Sep 20, 2025

Tags cleaned, sorry for tag pollution, still newbie with Git.

@droidmonkey
Copy link
Copy Markdown
Member

No worries hah, git has some stupid quirks still like that one.

@droidmonkey
Copy link
Copy Markdown
Member

I reordered the options to make the default one first (Open in browser) and Edit Entry last.

@droidmonkey droidmonkey added this to the v2.7.11 milestone Sep 21, 2025
Copilot AI and others added 4 commits November 1, 2025 10:35
Co-authored-by: juzu-o <3142026+juzu-o@users.noreply.github.com>
Co-authored-by: juzu-o <3142026+juzu-o@users.noreply.github.com>
@droidmonkey droidmonkey force-pushed the add-url-double-click-action-option branch from f739493 to f4f7115 Compare November 1, 2025 14:36
@droidmonkey droidmonkey merged commit 592d553 into keepassxreboot:develop Nov 2, 2025
11 checks passed
droidmonkey added a commit that referenced this pull request Nov 2, 2025
* Closes #4717

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: juzu-o <3142026+juzu-o@users.noreply.github.com>
Co-authored-by: Jonathan White <support@dmapps.us>
@droidmonkey droidmonkey added the pr: backported Pull request backported to previous release label Nov 2, 2025
dragonekii pushed a commit to dragonekii/keepassxc-custom that referenced this pull request Dec 8, 2025
Release 2.7.11 (2025-11-23)

- Add image, HTML, Markdown preview, and text editing support to inline attachment viewer [keepassxreboot#12085, keepassxreboot#12244, keepassxreboot#12654]
- Add database merge confirmation dialog [keepassxreboot#10173]
- Add option to auto-generate a password for new entries [keepassxreboot#12593]
- Add support for group sync in KeeShare [keepassxreboot#11593]
- Add {UUID} placeholder for use in references [keepassxreboot#12511]
- Add “Wait for Enter” search option [keepassxreboot#12263]
- Add keyboard shortcut to “Jump to Group” from search results [keepassxreboot#12225]
- Add predefined search for TOTP entries [keepassxreboot#12199]
- Add confirmation when closing database via ESC key [keepassxreboot#11963]
- Add support for escaping placeholder expressions [keepassxreboot#11904]
- Reduce tab indentation width in notes fields [keepassxreboot#11919]
- Cap default Argon2 parallelism when creating a new database [keepassxreboot#11853]
- Database lock after inactivity now enabled by default and set to 900 seconds [keepassxreboot#12689, keepassxreboot#12609]
- Copying TOTP now opens setup dialog if none is configured for entry [keepassxreboot#12584]
- Make double click action configurable [keepassxreboot#12322]
- Remove unused “Last Accessed” from GUI [keepassxreboot#12602]
- Auto-Type: Add more granular confirmation settings [keepassxreboot#12370]
- Auto-Type: Add URL typing preset and add copy options to menu [keepassxreboot#12341]
- Browser: Do not allow sites automatically if entry added from browser extension [keepassxreboot#12413]
- Browser: Add options to restrict exposed groups [keepassxreboot#9852, keepassxreboot#12119]
- Bitwarden Import: Add support for timestamps and password history [keepassxreboot#12588]
- macOS: Add Liquid Glass icon [keepassxreboot#12642]
- macOS: Remove theme-based menubar icon toggle [keepassxreboot#12685]
- macOS: Add Window and Help menus [keepassxreboot#12357]
- Windows: Add option to add KeePassXC to PATH during installation [keepassxreboot#12171]

- Fix window geometry not being restored properly when KeePassXC starts in tray [keepassxreboot#12683]
- Fix potential database truncation when using direct write save method with YubiKeys [keepassxreboot#11841]
- Fix issue with database backup saving [keepassxreboot#11874]
- Fix UI lockups during startup with multiple tabs [keepassxreboot#12053]
- Fix keyboard shortcuts when menubar is hidden [keepassxreboot#12431]
- Fix clipboard being cleared on exit even if no password was copied [keepassxreboot#12603]
- Fix single-instance detection when username contains invalid filename characters [keepassxreboot#12559]
- Fix “Search Wait for Enter” setting not being save [keepassxreboot#12614]
- Fix hotkey accelerators not being escaped properly on database tabs [keepassxreboot#12630]
- Fix confusing error if user cancels out of key file edit dialog [keepassxreboot#12639]
- Fix issues with saved searches and “Press Enter to Search” option [keepassxreboot#12314]
- Fix URL wildcard matching [keepassxreboot#12257]
- Fix TOTP visibility on unlock and settings change [keepassxreboot#12220]
- Fix KeeShare entries with reference attributes not updating [keepassxreboot#11809]
- Fix sort order not being maintained when toggling filters in database reports [keepassxreboot#11849]
- Fix several UI font and layout issues [keepassxreboot#11967,  keepassxreboot#12102]
- Prevent mouse wheel scroll on edit username field [keepassxreboot#12398]
- Improve base translation consistency [keepassxreboot#12432]
- Improve inactivity timer [keepassxreboot#12246]
- Documentation improvements [keepassxreboot#12373, keepassxreboot#12506]
- Browser: Fix ordering of clientDataJSON in Passkey response object [keepassxreboot#12120]
- Browser: Fix URL matching for additional URLs [keepassxreboot#12196]
- Browser: Fix group settings inheritance [keepassxreboot#12368]
- Browser: Allow read-only native messaging config files [keepassxreboot#12236]
- Browser: Optimise entry iteration in browser access control dialog [keepassxreboot#11817]
- Browser: Fix “Do not ask permission for HTTP Basic Auth” option [keepassxreboot#11871]
- Browser: Fix native messaging path for Tor Browser launcher on Linux [keepassxreboot#12005]
- Auto-Type: Fix empty window behaviour [keepassxreboot#12622]
- Auto-Type: Take delays into account when typing TOTP [keepassxreboot#12691]
- SSH Agent: Fix out-of-memory crash with malformed SSH keys [keepassxreboot#12606]
- CSV Import: Fix modified and creation time import [keepassxreboot#12379]
- CSV Import: Fix duplication of root groups on import [keepassxreboot#12240]
- Proton Pass Import: Fix email addresses not being imported when no username set [keepassxreboot#11888]
- macOS: Fix secure input getting stuck [keepassxreboot#11928]
- Windows: Prevent launch as SYSTEM user from MSI installer [keepassxreboot#12705]
- Windows: Remove broken check for MSVC Redistributable from MSI installer [keepassxreboot#11950]
- Linux: Fix startup delay due to StartupNotify setting in desktop file [keepassxreboot#12306]
- Linux: Fix memory initialisation when --pw-stdin is used with a pipe [keepassxreboot#12050]
hannpet pushed a commit to hannpet/keepassxc that referenced this pull request Jan 2, 2026
* Closes keepassxreboot#4717

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: juzu-o <3142026+juzu-o@users.noreply.github.com>
Co-authored-by: Jonathan White <support@dmapps.us>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: ai-assisted Pull request contains significant contributions by generative AI pr: backported Pull request backported to previous release user interface ux

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add option to copy URL to clipboard instead of opening it on double-click

4 participants