mirror of
https://github.com/rr-/pq-cli.git
synced 2026-09-28 22:33:59 -06:00
ui: change command map
This commit is contained in:
+10
-8
@@ -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", "", ""),
|
||||||
|
|||||||
Reference in New Issue
Block a user