Fix Alt-Gr and add shortcut to create copy again (#1544)
* Set QT_QPA_PLATFORM for Win on recent Qt versions Erroneously dropped for Qt 5.15.1+. * Enable original shortcut to create copy * minor tweaks to comment to make it clearer (dae)
This commit is contained in:
parent
1fb026cce9
commit
65f6728454
@ -523,12 +523,10 @@ def _run(argv: Optional[list[str]] = None, exec: bool = True) -> Optional[AnkiAp
|
||||
if os.environ.get("ANKI_SOFTWAREOPENGL"):
|
||||
QCoreApplication.setAttribute(Qt.ApplicationAttribute.AA_UseSoftwareOpenGL)
|
||||
|
||||
if (
|
||||
is_win
|
||||
and qtmajor == 5
|
||||
and (qtminor == 14 or (qtminor == 15 and qtpoint == 0))
|
||||
and "QT_QPA_PLATFORM" not in os.environ
|
||||
):
|
||||
# fix an issue on Windows, where Ctrl+Alt shortcuts are triggered by AltGr,
|
||||
# preventing users from typing things like "@" through AltGr+Q on a German
|
||||
# keyboard.
|
||||
if is_win and "QT_QPA_PLATFORM" not in os.environ:
|
||||
os.environ["QT_QPA_PLATFORM"] = "windows:altgr"
|
||||
|
||||
# create the app
|
||||
|
@ -666,6 +666,9 @@
|
||||
<property name="text">
|
||||
<string>actions_create_copy</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string notr="true">Ctrl+Alt+E</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources>
|
||||
|
Loading…
Reference in New Issue
Block a user