From a8422949ac8df56047e668995016de3cd7e058b4 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Thu, 5 Mar 2015 07:59:05 -0800 Subject: [PATCH] Fix keymap substitution We were only performing the '-' -> ' ' substitution needed for keymap names when updating urwid commands. Do that for all commands. Change-Id: I2bae39523993da12848c818e6caef259d9f9fa4a --- gertty/keymap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gertty/keymap.py b/gertty/keymap.py index a1ad47a..45ed9bc 100644 --- a/gertty/keymap.py +++ b/gertty/keymap.py @@ -153,6 +153,7 @@ class KeyMap(object): for command, keys in config.items(): if command == 'name': continue + command = command.replace('-', ' ') if type(keys) != type([]): keys = [keys] self.commandmap[command] = keys @@ -174,7 +175,6 @@ class KeyMap(object): "Update the urwid command map with this keymap" for key, commands in self.keymap.items(): for command in commands: - command = command.replace('-', ' ') if command in URWID_COMMANDS: urwid.command_map[key]=command