Skip to content

gui: Add keyboard shortcuts to history browser tree#7423

Open
polucifier wants to merge 2 commits into
OSGeo:mainfrom
polucifier:history-shortcuts
Open

gui: Add keyboard shortcuts to history browser tree#7423
polucifier wants to merge 2 commits into
OSGeo:mainfrom
polucifier:history-shortcuts

Conversation

@polucifier
Copy link
Copy Markdown
Contributor

@polucifier polucifier commented May 22, 2026

Description

This Pull Request implements the requested keyboard shortcuts for the history browser tree, improving accessibility and overall user experience. Users who prefer using the keyboard over context menus can now manage their command history much faster.

Key Changes

  • Added Ctrl + C shortcut to copy the selected command to the clipboard.
  • Added Ctrl + D and the Delete key shortcuts to remove the selected command from the history log.
  • Added Enter and Return key shortcuts (including the numpad) to mimic the double-click behavior.
  • Added safety checks to ensure these shortcuts only trigger on command nodes (COMMAND), preventing accidental modification or deletion of day/time period header nodes (TIME_PERIOD).

Related PRs / Issues

How to Test

  1. Open the History tab in the GRASS GUI.
  2. Select any successfully executed command.
  3. Press Ctrl + C and try pasting it into a text editor to verify it was copied.
  4. Press Delete or Ctrl + D on a command, confirm the dialog, and verify it was removed.
  5. Try pressing these keys on a date header (e.g., "Today") and verify that nothing happens.

Implement Ctrl+C for copying commands and Ctrl+D / Delete for removing commands from the history browser tree. This improves accessibility and UX for users who prefer keyboard shortcuts over context menus.
@github-actions github-actions Bot added GUI wxGUI related Python Related code is in Python labels May 22, 2026
@polucifier polucifier changed the title wxgui: Add keyboard shortcuts to history browser tree gui: Add keyboard shortcuts to history browser tree May 22, 2026
@polucifier polucifier marked this pull request as draft May 23, 2026 17:15
Comment thread gui/wxpython/history/tree.py Outdated
@polucifier polucifier force-pushed the history-shortcuts branch from e6e75ae to b552d89 Compare May 24, 2026 12:32
@polucifier polucifier marked this pull request as ready for review May 24, 2026 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GUI wxGUI related Python Related code is in Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant