summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-03-21 04:31:41 +0100
committerhut <hut@lavabit.com>2010-03-21 04:31:41 +0100
commita1cd4fdc2326d4b15266b708b87a6aab9ec172ed (patch)
tree249f3976ae87c396e39db263b013993cc2ea258e
parentc776804d9db1f0ae837aaafe8ed27eb47bb369f5 (diff)
downloadranger-a1cd4fdc2326d4b15266b708b87a6aab9ec172ed.tar.gz
widgets.console: allow unicode input. (if flushinput == False)
-rw-r--r--ranger/gui/widgets/console.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/ranger/gui/widgets/console.py b/ranger/gui/widgets/console.py
index feb54a3d..20a75c4e 100644
--- a/ranger/gui/widgets/console.py
+++ b/ranger/gui/widgets/console.py
@@ -130,9 +130,13 @@ class Console(Widget):
 	def press(self, key):
 		from curses.ascii import ctrl, ESC
 
+		keytuple = self.env.keybuffer.tuple_with_numbers()
 		try:
-			cmd = self.commandlist[self.env.keybuffer.tuple_with_numbers()]
+			cmd = self.commandlist[keytuple]
 		except KeyError:
+			# An unclean hack to allow unicode input.
+			# This whole part should be replaced.
+			self.type_key(chr(keytuple[0]))
 			self.env.key_clear()
 			return