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

Fixes Shortcuts prevent inputs with AltGr #29021 #51420

Merged
merged 2 commits into from
Jan 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,16 @@ int main( int argc, char *argv[] )
// Initialize the application and the translation stuff
/////////////////////////////////////////////////////////////////////


#if defined(Q_OS_WIN)
Copy link
Contributor

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
// Prevent Qt from treating the AltGr key as Ctrl+Alt on Windows, which causes shortcuts to be fired
// instead of entering some characters (eg "}", "|") on some keyboard layouts
// See https://doc.qt.io/qt-6/qguiapplication.html#platform-specific-arguments
qputenv( "QT_QPA_PLATFORM", "windows:altgr" );
YoannQDQ marked this conversation as resolved.
Show resolved Hide resolved
#endif


#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) && !defined(ANDROID)
bool myUseGuiFlag = nullptr != getenv( "DISPLAY" );
#else
Expand Down