Skip to content

Conversation

@juzu-o
Copy link
Contributor

@juzu-o juzu-o commented Aug 2, 2025

Description

This pull request adds URL auto-typing and copying functionality to KeePassXC's auto-type selection popup window to address the missing URL options in the auto-type feature.

Changes implemented:

  • Added "Type {URL}" option to the auto-type selection popup right-click context menu
  • Added "Copy {URL}" option to the auto-type selection popup right-click context menu
  • Added keyboard shortcuts: CTRL+4 for "Type {URL}" and CTRL+SHIFT+4 for "Copy {URL}"
  • Updated "Use Virtual Keyboard" shortcut from CTRL+4 to CTRL+5 to avoid inconsistency with order of shortcuts
  • Added URL auto-type options "{URL}" and "{URL}{ENTER}" to main window entry view right-click menu
  • Added URL auto-type options "{URL}" and "{URL}{ENTER}" to toolbar auto-type button dropdown menu
  • Added translation strings for "Type {URL}" and "Copy {URL}" to support internationalization

The implementation follows the existing patterns used for username and password auto-type/copy functionality, ensuring consistency across the application. URL options are placed after existing auto-type options (username, password, TOTP) and are properly disabled when entries don't have URL fields.

Fixes #12315

AI Disclosure: This pull request was created with assistance from Copilot AI (Claude Sonnet 4 language model) for code generation and implementation guidance.

Screenshots

Auto-type_popup_window_context_menu
auto-type_toolbar_menu

Testing strategy

Manual Testing Performed:

  • Verified new URL auto-type and copy options appear in auto-type selection popup context menu
  • Tested keyboard shortcuts CTRL+4 and CTRL+SHIFT+4 for URL functionality
  • Confirmed "Use Virtual Keyboard" shortcut change from CTRL+4 to CTRL+5 works correctly
  • Tested URL auto-type options in main window entry view right-click menu
  • Tested URL auto-type options in toolbar auto-type button dropdown menu
  • Verified options are properly disabled for entries without URL fields
  • Tested with entries containing various URL formats
  • Confirmed no regressions in existing auto-type functionality
  • Verified translation strings are properly integrated
  • Tested on platforms: Windows and Linux (Fedora 42 / KDE / X11)

Type of change

  • ✅ New feature (change that adds functionality)

Copilot AI review requested due to automatic review settings August 2, 2025 16:53
Copy link
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 URL auto-typing and copying functionality to KeePassXC's auto-type selection popup window and main entry menus. The implementation follows existing patterns for username, password, and TOTP fields to provide consistent URL handling across the application.

Key Changes:

  • Added URL auto-type options ("{URL}" and "{URL}{ENTER}") to context menus and toolbar dropdowns
  • Added keyboard shortcuts Ctrl+4 for "Type {URL}" and Ctrl+Shift+4 for "Copy {URL}"
  • Updated "Use Virtual Keyboard" shortcut from Ctrl+4 to Ctrl+5 to avoid conflicts

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/gui/MainWindow.ui Defines new UI actions for URL auto-type functionality
src/gui/MainWindow.cpp Implements URL auto-type actions in main window menus and connects signals
src/gui/DatabaseWidget.h Declares new URL auto-type method signatures
src/gui/DatabaseWidget.cpp Implements URL auto-type methods that call performAutoType with URL templates
src/autotype/AutoTypeSelectDialog.ui Updates help text to show new Ctrl+4 URL shortcut and Ctrl+5 virtual keyboard
src/autotype/AutoTypeSelectDialog.cpp Adds URL field support to auto-type selection dialog context menu
share/translations/keepassxc_en.ts Adds translation strings for new URL-related menu items

@droidmonkey droidmonkey added feature: Auto-Type pr: new feature Pull request adds a new feature labels Aug 2, 2025
@droidmonkey droidmonkey added this to the v2.7.11 milestone Aug 2, 2025
@droidmonkey droidmonkey added the pr: ai-assisted Pull request contains significant contributions by generative AI label Aug 2, 2025
@juzu-o
Copy link
Contributor Author

juzu-o commented Aug 6, 2025

I'd like to propose an addition to this PR.
It came to my mind afterwards, that since users can now choose to auto-type URL in auto-type selection popup, it would be useful to be able to see/check what the URL actually is, by adding URL column to selection popup window.

This addition could be introduced as a separate/standalone PR too, if that would be a better approach.

The commit for this feature can be found in here:
juzu-o@86393ad

This also adds ability to Column Filtering mode to search by URL.

Here below is a technical summary about the addition:

Technical Summary: Add URL Column to Auto-Type Selection Dialog

Feature Overview

This feature adds a new URL column to the auto-type selection popup window, displaying each entry's URL field alongside the existing Group, Title, Username, and Sequence columns. The URL column is positioned as the last column (index 4) after the Sequence column.

AI Disclosure

AI Disclosure: This pull request was created with assistance from Copilot AI (Claude Sonnet 4 language model) for code generation and implementation guidance.

Implementation Details

Files Modified

src/autotype/AutoTypeMatchModel.h

  • Extended ModelColumn enum to include URL = 4
  • Maintains backward compatibility with existing column indices

src/autotype/AutoTypeMatchModel.cpp

  • Updated columnCount() method to return 5 instead of 4 to accommodate the new column
  • Added URL case in data() method's Qt::DisplayRole switch statement to return resolved URL content
  • Added URL case in headerData() method to return "URL" as the column header text
  • URL data supports placeholder resolution using match.first->resolveMultiplePlaceholders(match.first->url())

src/autotype/AutoTypeMatchView.cpp

  • Modified CustomSortFilterProxyModel::filterAcceptsRow() to include URL column (index 4) in search filtering
  • Extended filtering from 3 columns (Group, Title, Username) to 4 columns (Group, Title, Username, URL)
  • Sequence column remains excluded from filtering as intended

Technical Behavior

Column Layout:
auto-type-URL-column-and-filtering

Search Functionality:

  • Column Filtering Mode (default): Now searches Group, Title, Username, and URL fields
  • Database Search Mode: Unchanged - continues to use EntrySearcher for comprehensive database searching
  • Sequence column intentionally excluded from filtering in both the original and updated implementation

Data Handling:

  • URL field supports KeePassXC's placeholder system (e.g., {USERNAME}, {TITLE}, etc.)
  • Empty URLs display as empty cells without special handling
  • Column automatically resizes to content like other columns

@droidmonkey
Copy link
Member

The URL column is very specific and usually not relevant to auto-type. There is a request for showing more columns in the auto-type dialog: #11389 and #1416

Let's save column adjustments for another PR, one that also let's users decide which columns to show (right click menu) and saves the state of those columns in settings.

@droidmonkey droidmonkey self-requested a review August 10, 2025 02:22
@droidmonkey droidmonkey merged commit 9e8a966 into keepassxreboot:develop Aug 10, 2025
11 checks passed
pull bot pushed a commit to blog2i2j/keepassxreboot.._..keepassxc that referenced this pull request Aug 10, 2025
…enus (keepassxreboot#12341)

* Added "Type {URL}" option to the auto-type selection popup right-click context menu
* Added "Copy {URL}" option to the auto-type selection popup right-click context menu
* Added keyboard shortcuts: CTRL+4 for "Type {URL}" and CTRL+SHIFT+4 for "Copy {URL}"
* Updated "Use Virtual Keyboard" shortcut from CTRL+4 to CTRL+5 to avoid inconsistency with order of shortcuts
* Added URL auto-type options "{URL}" and "{URL}{ENTER}" to main window entry view right-click menu
* Added URL auto-type options "{URL}" and "{URL}{ENTER}" to toolbar auto-type button dropdown menu
* Added translation strings for "Type {URL}" and "Copy {URL}" to support internationalization

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: juzu-o <[email protected]>
Co-authored-by: Jonathan White <[email protected]>
pull bot pushed a commit to surkin/keepassxc that referenced this pull request Aug 10, 2025
…enus (keepassxreboot#12341)

* Added "Type {URL}" option to the auto-type selection popup right-click context menu
* Added "Copy {URL}" option to the auto-type selection popup right-click context menu
* Added keyboard shortcuts: CTRL+4 for "Type {URL}" and CTRL+SHIFT+4 for "Copy {URL}"
* Updated "Use Virtual Keyboard" shortcut from CTRL+4 to CTRL+5 to avoid inconsistency with order of shortcuts
* Added URL auto-type options "{URL}" and "{URL}{ENTER}" to main window entry view right-click menu
* Added URL auto-type options "{URL}" and "{URL}{ENTER}" to toolbar auto-type button dropdown menu
* Added translation strings for "Type {URL}" and "Copy {URL}" to support internationalization

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: juzu-o <[email protected]>
Co-authored-by: Jonathan White <[email protected]>
pull bot pushed a commit to gburkhow/keepassxc that referenced this pull request Sep 26, 2025
…enus (keepassxreboot#12341)

* Added "Type {URL}" option to the auto-type selection popup right-click context menu
* Added "Copy {URL}" option to the auto-type selection popup right-click context menu
* Added keyboard shortcuts: CTRL+4 for "Type {URL}" and CTRL+SHIFT+4 for "Copy {URL}"
* Updated "Use Virtual Keyboard" shortcut from CTRL+4 to CTRL+5 to avoid inconsistency with order of shortcuts
* Added URL auto-type options "{URL}" and "{URL}{ENTER}" to main window entry view right-click menu
* Added URL auto-type options "{URL}" and "{URL}{ENTER}" to toolbar auto-type button dropdown menu
* Added translation strings for "Type {URL}" and "Copy {URL}" to support internationalization

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: juzu-o <[email protected]>
Co-authored-by: Jonathan White <[email protected]>
@droidmonkey droidmonkey added the pr: backported Pull request backported to previous release label Oct 25, 2025
droidmonkey added a commit that referenced this pull request Oct 26, 2025
…enus (#12341)

* Added "Type {URL}" option to the auto-type selection popup right-click context menu
* Added "Copy {URL}" option to the auto-type selection popup right-click context menu
* Added keyboard shortcuts: CTRL+4 for "Type {URL}" and CTRL+SHIFT+4 for "Copy {URL}"
* Updated "Use Virtual Keyboard" shortcut from CTRL+4 to CTRL+5 to avoid inconsistency with order of shortcuts
* Added URL auto-type options "{URL}" and "{URL}{ENTER}" to main window entry view right-click menu
* Added URL auto-type options "{URL}" and "{URL}{ENTER}" to toolbar auto-type button dropdown menu
* Added translation strings for "Type {URL}" and "Copy {URL}" to support internationalization

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: juzu-o <[email protected]>
Co-authored-by: Jonathan White <[email protected]>
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]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: Auto-Type pr: ai-assisted Pull request contains significant contributions by generative AI pr: backported Pull request backported to previous release pr: new feature Pull request adds a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto-Type - Option to open a URL is missing

2 participants