ui: change command map

This commit is contained in:
rr-
2018-11-05 21:04:39 +01:00
parent 2b6171da6e
commit 3c71ed1868
+10 -8
View File
@@ -8,14 +8,16 @@ from pqcli.ui.new_game_view import NewGameView
from pqcli.ui.roster_view import RosterView from pqcli.ui.roster_view import RosterView
urwid.command_map["k"] = "cursor up" for key, direction in {
urwid.command_map["K"] = "cursor up" "k": "up",
urwid.command_map["j"] = "cursor down" "j": "down",
urwid.command_map["J"] = "cursor down" "h": "left",
urwid.command_map["h"] = "cursor left" "l": "right",
urwid.command_map["H"] = "cursor left" }.items():
urwid.command_map["l"] = "cursor right" for key_variant in {key, key.upper()}:
urwid.command_map["L"] = "cursor right" urwid.command_map[key_variant] = f"cursor {direction}"
urwid.command_map["tab"] = f"cursor down"
urwid.command_map["shift tab"] = f"cursor up"
PALETTE: T.List[T.Tuple[str]] = [ PALETTE: T.List[T.Tuple[str]] = [
("button", "", ""), ("button", "", ""),