diff options
-rw-r--r-- | ranger/ext/keybindings.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ranger/ext/keybindings.py b/ranger/ext/keybindings.py index dd831836..133da83b 100644 --- a/ranger/ext/keybindings.py +++ b/ranger/ext/keybindings.py @@ -15,6 +15,9 @@ from ranger.ext.keybinding_parser import (parse_keybinding, ANYKEY, PASSIVE_ACTION, QUANT_KEY) +import sys + +PY3 = sys.version > '3' digits = set(range(ord('0'), ord('9')+1)) @@ -29,6 +32,8 @@ class KeyMaps(dict): pointer = self[context] except: self[context] = pointer = dict() + if PY3: + keys = keys.encode('utf-8').decode('latin-1') keys = list(parse_keybinding(keys)) if not keys: return |