Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add keyboard shortcut #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Vbialk
Copy link

@Vbialk Vbialk commented May 2, 2023

A keyboard shortcut is added to run the delete-all action using the key combination Ctrl+Alt+D.

Ein Tastatur Shortcut wird eingebaut, mit dem die delete-all Aktion über die Tastenkombination Strg+Alt+D ausgeführt werden kann.

A keyboard shortcut is added to run the delete-all action using the key combination Ctrl+Alt+D.

Ein Tastatur Shortcut wird eingebaut, mit dem die delete-all Aktion über die Tastenkombination Strg+Alt+D ausgeführt werden kann.
Copy link
Member

@pathmapper pathmapper left a comment

Choose a reason for hiding this comment

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

Nice idea adding a shortcut 👍

Some issues with this implementation:

  • after installing the plugin, there's no entry in the shortcuts manager
  • adds also the shortcut when there's already a shortcut with this key sequence, leading to disfunctional shortcuts
  • when setting a custom key sequence, after deactivating/activating the plugin, the tooltip shows a different key sequence compared to the sequence in the shortcuts manager

The shortcut is now implemented with a MainWindowAction (default shortcut) and the QgsShortcutsManager. If the shortcut is set and no other shortcut is assigned to the combination "Ctrl+Alt+D", the default shortcut is assigned. @pathmapper this should realize your suggetions, please test it :-)
@pathmapper
Copy link
Member

@Vbialk thanks for the update,

adds also the shortcut when there's already a shortcut with this key sequence, leading to disfunctional shortcuts

is still an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants