Skip to content

Conversation

@fedelibre
Copy link
Member

GNOME and Windows¹ do not have a standard keyboard shortcut to open the Preferences so there's no default shortcut in these platforms. We can force Ctrl+, which is the default on macOS but it's also very common on some popular crossplatform editors.

This is a partial fix for #887

¹ https://doc.qt.io/qt-6/qkeysequence.html#standard-shortcuts

@fedelibre
Copy link
Member Author

I've added a comment in the code to explain why we do not use QKeySequence.StandardKey.Preferences.

I know that a user might set this shortcut in the Preferences, but many users are lazy and might not even know they can do it.
IMO a default keyboard shortcut to open the Preferences should always be present. And if QKeySequence.StandardKey.Preferences doesn't have a default on Windows and GNOME, then the only option is using the same shortcut for all platforms.

What do you think?

@fedelibre fedelibre requested a review from bmjcode May 20, 2025 20:44
Copy link
Collaborator

@bmjcode bmjcode left a comment

Choose a reason for hiding this comment

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

Looks good to me -- though I would suggest adding that Ctrl+, is a Mac shortcut in case anyone wonders why that specific combination.

@fedelibre
Copy link
Member Author

Ok, I will do it.

I can't find a default shortcut for Windows.

But Ctrl+, is also the new default in GNOME, as documented in GNOME Human Interface Guidelines. Qt should be updated... I might open an issue in the Qt tracker.

immagine

Qt doesn't have a default keyboard shortcut for GNOME and Windows
to open the Preferences¹, so a default shortcut is currently
missing in these platforms.
We can force Ctrl+, which is the default on macOS as well as in
GNOME² and it's also very common on some popular crossplatform
editors.

This is a partial fix for #887

¹ https://doc.qt.io/qt-6/qkeysequence.html#standard-shortcuts
² https://developer.gnome.org/hig/reference/keyboard.html
@fedelibre
Copy link
Member Author

I tried improving both the comment and the commit message

@fedelibre
Copy link
Member Author

I've opened QTBUG-137059

Copy link
Collaborator

@bmjcode bmjcode left a comment

Choose a reason for hiding this comment

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

Works for me.

@fedelibre fedelibre merged commit a507f4d into master May 21, 2025
@fedelibre fedelibre deleted the pref-shortcut branch May 21, 2025 12:35
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.

3 participants