From 46dbd9b24b417911ad11d93d2d3a42591580102e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 5 Oct 2019 07:26:15 +0530 Subject: [PATCH] Use macOS specific modifier names in UI --- src/pyj/read_book/shortcuts.pyj | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/pyj/read_book/shortcuts.pyj b/src/pyj/read_book/shortcuts.pyj index 9bd6dda0d1..b94d034a62 100644 --- a/src/pyj/read_book/shortcuts.pyj +++ b/src/pyj/read_book/shortcuts.pyj @@ -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: