summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/ext/keybinding_parser.py8
-rw-r--r--ranger/gui/ui.py2
2 files changed, 7 insertions, 3 deletions
diff --git a/ranger/ext/keybinding_parser.py b/ranger/ext/keybinding_parser.py
index 780359f5..8efb337f 100644
--- a/ranger/ext/keybinding_parser.py
+++ b/ranger/ext/keybinding_parser.py
@@ -34,6 +34,8 @@ special_keys = {
     'end': curses.KEY_END,
     'tab': ord('\t'),
     's-tab': curses.KEY_BTAB,
+    'lt': ord('<'),
+    'gt': ord('>'),
 }
 
 very_special_keys = {
@@ -46,12 +48,14 @@ very_special_keys = {
 for key, val in tuple(special_keys.items()):
     special_keys['a-' + key] = (ALT_KEY, val)
 
-for char in 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789':
+for char in 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_!{}':
     special_keys['a-' + char] = (ALT_KEY, ord(char))
 
-for char in 'abcdefghijklmnopqrstuvwxyz':
+for char in 'abcdefghijklmnopqrstuvwxyz_':
     special_keys['c-' + char] = ord(char) - 96
 
+special_keys['c-space'] = 0
+
 for n in range(64):
     special_keys['f' + str(n)] = curses.KEY_F0 + n
 
diff --git a/ranger/gui/ui.py b/ranger/gui/ui.py
index 1d125acf..b006e671 100644
--- a/ranger/gui/ui.py
+++ b/ranger/gui/ui.py
@@ -199,7 +199,7 @@ class UI(DisplayableContainer):
                 curses.flushinp()
         else:
             # Handle simple key presses, CTRL+X, etc here:
-            if key > 0:
+            if key >= 0:
                 if self.settings.flushinput and not self.console.visible:
                     curses.flushinp()
                 if key == curses.KEY_MOUSE: