about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/ext/keybinding_parser.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/ranger/ext/keybinding_parser.py b/ranger/ext/keybinding_parser.py
index 3589b9dd..0519f69f 100644
--- a/ranger/ext/keybinding_parser.py
+++ b/ranger/ext/keybinding_parser.py
@@ -87,10 +87,13 @@ def parse_keybinding(obj):
                         for key in keys:
                             yield key
                     except KeyError:
-                        yield ord('<')
-                        for c in bracket_content:
-                            yield ord(c)
-                        yield ord('>')
+                        if string.isdigit():
+                            yield int(string)
+                        else:
+                            yield ord('<')
+                            for c in bracket_content:
+                                yield ord(c)
+                            yield ord('>')
                     except TypeError:
                         yield keys  # it was no tuple, just an int
                 else: