-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Fixes Shortcuts prevent inputs with AltGr #29021 #51420
Conversation
I'm not sure this is the right way to do it, but it seems to work (at least for the portable version on Windows) |
@YoannQDQ Can you add a more verbose and explicit title to the pull request, please? Thanks |
Looks good to me, I'd love a second opinion though! |
Huh. Pipeline failed, but if I understand the logs correctly, it's not on me. Could someone trigger another run? |
Strange, I never had any issues with key modifiers. |
Which OS/keyboard layout do you use? |
Qwerty with can-fr or can-multilingual layout. Win10 |
@roya0045, the issue also occurs using the Italian and Spanish keyboard layouts (as reported in the issue report). |
@@ -891,6 +891,16 @@ int main( int argc, char *argv[] ) | |||
// Initialize the application and the translation stuff | |||
///////////////////////////////////////////////////////////////////// | |||
|
|||
|
|||
#if defined(Q_OS_WIN) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, is Q_OS_WIN
referring to the host at compile time or the build target?
Fixes #29021
Description
A long standing bug in QGIS is the inability to enter some characters (
}
,|
, ...) on windows, with keyboard layouts that use the AltGr key (Spanish, French...). This is particularly annoying within the python console.The reason is that Qt considers by default the AltGr key to be a shortcut for Ctrl+Alt, which causes some QGIS global shortcuts to be fired instead of entering the character.
There has been some discussion about this on PR #38608.
This is not specific to QGIS, as it happens in other Qt applications (see https://bugreports.qt.io/browse/QTBUG-73247)
Setting the environment variable
QT_QPA_PLATFORM=windows:altgr
before creating the QgsApplication on windows builds could neatly solve the issue. (cf. https://doc.qt.io/qt-6/qguiapplication.html#platform-specific-arguments)