From a5b7694e59caeb518cbaf0c563e161de0d21930a Mon Sep 17 00:00:00 2001 From: chrys Date: Mon, 19 Aug 2019 17:27:00 +0200 Subject: [PATCH] Update commandManager.py --- src/fenrirscreenreader/core/commandManager.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/fenrirscreenreader/core/commandManager.py b/src/fenrirscreenreader/core/commandManager.py index ebf0c8ba..90e5f2d8 100644 --- a/src/fenrirscreenreader/core/commandManager.py +++ b/src/fenrirscreenreader/core/commandManager.py @@ -249,6 +249,15 @@ class commandManager(): shortcut = [] try: rawShortcut = list(self.env['bindings'].keys())[list(self.env['bindings'].values()).index(command)] + # prefer numbers for multitap + for k in ['2', '3', '4', '5', '6', '7', '8']: + if k in rawShortcut: + formattedKey = k + if formatKeys: + formattedKey = formattedKey.lower() + formattedKey += ' times ' + shortcut.append(formattedKey) + rawShortcut.remove(k) # prefer metha keys for k in ['KEY_FENRIR', 'KEY_SCRIPT', 'KEY_CTRL', 'KEY_SHIFT', 'KEY_ALT', 'KEY_META']: if k in rawShortcut: @@ -264,7 +273,7 @@ class commandManager(): formattedKey = k if formatKeys: formattedKey = formattedKey.lower() - formattedKey = formattedKey.replace('key_kp', ' kp ') + formattedKey = formattedKey.replace('key_kp', ' keypad ') formattedKey = formattedKey.replace('key_', ' ') shortcut.append(formattedKey) except: