mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
fix detection of shift key at startup
Our regular helper doesn't appear to work during startup.
This commit is contained in:
parent
009878f75d
commit
157f602624
1 changed files with 7 additions and 1 deletions
|
@ -119,7 +119,13 @@ class AnkiQt(QMainWindow):
|
|||
self.app = app
|
||||
self.pm = profileManager
|
||||
# init rest of app
|
||||
self.safeMode = (KeyboardModifiersPressed().shift) or self.opts.safemode
|
||||
self.safeMode = (
|
||||
bool(
|
||||
cast(Qt.KeyboardModifier, self.app.queryKeyboardModifiers())
|
||||
& Qt.ShiftModifier
|
||||
)
|
||||
or self.opts.safemode
|
||||
)
|
||||
try:
|
||||
self.setupUI()
|
||||
self.setupAddons(args)
|
||||
|
|
Loading…
Reference in a new issue