mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-05-31 02:55:19 -04:00
...
This commit is contained in:
@@ -59,8 +59,9 @@ class NameConflict(ValueError):
|
||||
pass
|
||||
|
||||
|
||||
def keysequence_from_event(ev): # {{{
|
||||
k, mods = ev.keyCombination().key(), ev.modifiers()
|
||||
def keysequence_from_event(ev: QKeyEvent): # {{{
|
||||
kc = ev.keyCombination()
|
||||
k, mods = kc.key(), kc.keyboardModifiers()
|
||||
if k in (
|
||||
0, Qt.Key.Key_unknown, Qt.Key.Key_Shift, Qt.Key.Key_Control, Qt.Key.Key_Alt,
|
||||
Qt.Key.Key_Meta, Qt.Key.Key_AltGr, Qt.Key.Key_CapsLock, Qt.Key.Key_NumLock,
|
||||
|
||||
Reference in New Issue
Block a user