Use macOS specific modifier names in UI

This commit is contained in:
Kovid Goyal 2019-10-05 07:26:15 +05:30
parent f542ac933d
commit 46dbd9b24b
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -67,6 +67,11 @@ def key_as_text(evt):
mods = v'[]'
for x in ('alt', 'ctrl', 'meta', 'shift'):
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 = '+'.join(mods)
if mods: