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
This commit is contained in:
parent
3750ccdf42
commit
a8422949ac
@ -153,6 +153,7 @@ class KeyMap(object):
|
|||||||
for command, keys in config.items():
|
for command, keys in config.items():
|
||||||
if command == 'name':
|
if command == 'name':
|
||||||
continue
|
continue
|
||||||
|
command = command.replace('-', ' ')
|
||||||
if type(keys) != type([]):
|
if type(keys) != type([]):
|
||||||
keys = [keys]
|
keys = [keys]
|
||||||
self.commandmap[command] = keys
|
self.commandmap[command] = keys
|
||||||
@ -174,7 +175,6 @@ class KeyMap(object):
|
|||||||
"Update the urwid command map with this keymap"
|
"Update the urwid command map with this keymap"
|
||||||
for key, commands in self.keymap.items():
|
for key, commands in self.keymap.items():
|
||||||
for command in commands:
|
for command in commands:
|
||||||
command = command.replace('-', ' ')
|
|
||||||
if command in URWID_COMMANDS:
|
if command in URWID_COMMANDS:
|
||||||
urwid.command_map[key]=command
|
urwid.command_map[key]=command
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user