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"):
|
if os.environ.get("ANKI_SOFTWAREOPENGL"):
|
||||||
QCoreApplication.setAttribute(Qt.ApplicationAttribute.AA_UseSoftwareOpenGL)
|
QCoreApplication.setAttribute(Qt.ApplicationAttribute.AA_UseSoftwareOpenGL)
|
||||||
|
|
||||||
if (
|
# fix an issue on Windows, where Ctrl+Alt shortcuts are triggered by AltGr,
|
||||||
is_win
|
# preventing users from typing things like "@" through AltGr+Q on a German
|
||||||
and qtmajor == 5
|
# keyboard.
|
||||||
and (qtminor == 14 or (qtminor == 15 and qtpoint == 0))
|
if is_win and "QT_QPA_PLATFORM" not in os.environ:
|
||||||
and "QT_QPA_PLATFORM" not in os.environ
|
|
||||||
):
|
|
||||||
os.environ["QT_QPA_PLATFORM"] = "windows:altgr"
|
os.environ["QT_QPA_PLATFORM"] = "windows:altgr"
|
||||||
|
|
||||||
# create the app
|
# create the app
|
||||||
|
@ -666,6 +666,9 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>actions_create_copy</string>
|
<string>actions_create_copy</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string notr="true">Ctrl+Alt+E</string>
|
||||||
|
</property>
|
||||||
</action>
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
|
Loading…
Reference in New Issue
Block a user