mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Use macOS specific modifier names in UI
This commit is contained in:
parent
f542ac933d
commit
46dbd9b24b
@ -67,6 +67,11 @@ def key_as_text(evt):
|
|||||||
mods = v'[]'
|
mods = v'[]'
|
||||||
for x in ('alt', 'ctrl', 'meta', 'shift'):
|
for x in ('alt', 'ctrl', 'meta', 'shift'):
|
||||||
if evt[x + 'Key']:
|
if evt[x + 'Key']:
|
||||||
|
if 'macos' in window.navigator.userAgent:
|
||||||
|
if x is 'alt':
|
||||||
|
x = 'option'
|
||||||
|
elif x is 'meta':
|
||||||
|
x = '⌘'
|
||||||
mods.push(x.capitalize())
|
mods.push(x.capitalize())
|
||||||
mods = '+'.join(mods)
|
mods = '+'.join(mods)
|
||||||
if mods:
|
if mods:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user