mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Viewer: Fix Ctrl+i shortcut not working on Windows
This commit is contained in:
parent
b41b0a99af
commit
6bdbc6f07d
@ -51,10 +51,13 @@ def get_key_text(evt):
|
|||||||
cc = key.charCodeAt(0)
|
cc = key.charCodeAt(0)
|
||||||
# on windows in webengine pressing ctrl+ascii char gives us an ascii
|
# on windows in webengine pressing ctrl+ascii char gives us an ascii
|
||||||
# control code
|
# control code
|
||||||
if (0 < cc < 32 or key is 'Enter') and evt.ctrlKey and not evt.metaKey and not evt.altKey:
|
if (0 < cc < 32 or key is 'Enter' or key is 'Tab') and evt.ctrlKey and not evt.metaKey and not evt.altKey:
|
||||||
if key is 'Enter':
|
if key is 'Enter':
|
||||||
if evt.code and evt.code is not 'Enter':
|
if evt.code and evt.code is not 'Enter':
|
||||||
key = 'm'
|
key = 'm'
|
||||||
|
elif key is 'Tab':
|
||||||
|
if evt.code and evt.code is not 'Tab':
|
||||||
|
key = 'i'
|
||||||
else:
|
else:
|
||||||
key = chr(96 + cc)
|
key = chr(96 + cc)
|
||||||
return key
|
return key
|
||||||
|
Loading…
x
Reference in New Issue
Block a user