Skip to content

Commit 808994d

Browse files
committed
Add/update missing binding descriptions
1 parent 6afad2f commit 808994d

File tree

2 files changed

+31
-19
lines changed

2 files changed

+31
-19
lines changed

src/textual/command.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -537,13 +537,23 @@ class CommandPalette(SystemModalScreen):
537537
"""
538538

539539
BINDINGS: ClassVar[list[BindingType]] = [
540-
Binding("ctrl+end, shift+end", "command_list('last')", show=False),
541-
Binding("ctrl+home, shift+home", "command_list('first')", show=False),
542-
Binding("down", "cursor_down", show=False),
540+
Binding(
541+
"ctrl+end, shift+end",
542+
"command_list('last')",
543+
"Go to bottom",
544+
show=False,
545+
),
546+
Binding(
547+
"ctrl+home, shift+home",
548+
"command_list('first')",
549+
"Go to top",
550+
show=False,
551+
),
552+
Binding("down", "cursor_down", "Next command", show=False),
543553
Binding("escape", "escape", "Exit the command palette"),
544-
Binding("pagedown", "command_list('page_down')", show=False),
545-
Binding("pageup", "command_list('page_up')", show=False),
546-
Binding("up", "command_list('cursor_up')", show=False),
554+
Binding("pagedown", "command_list('page_down')", "Next page", show=False),
555+
Binding("pageup", "command_list('page_up')", "Previous page", show=False),
556+
Binding("up", "command_list('cursor_up')", "Previous command", show=False),
547557
]
548558
"""
549559
| Key(s) | Description |

src/textual/widgets/_input.py

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -93,23 +93,25 @@ class Input(Widget, can_focus=True):
9393
"""A text input widget."""
9494

9595
BINDINGS: ClassVar[list[BindingType]] = [
96-
Binding("left", "cursor_left", "cursor left", show=False),
97-
Binding("ctrl+left", "cursor_left_word", "cursor left word", show=False),
98-
Binding("right", "cursor_right", "cursor right", show=False),
99-
Binding("ctrl+right", "cursor_right_word", "cursor right word", show=False),
100-
Binding("backspace", "delete_left", "delete left", show=False),
101-
Binding("home,ctrl+a", "home", "home", show=False),
102-
Binding("end,ctrl+e", "end", "end", show=False),
103-
Binding("delete,ctrl+d", "delete_right", "delete right", show=False),
104-
Binding("enter", "submit", "submit", show=False),
96+
Binding("left", "cursor_left", "Move cursor left", show=False),
97+
Binding("ctrl+left", "cursor_left_word", "Move cursor left a word", show=False),
98+
Binding("right", "cursor_right", "Move cursor right", show=False),
10599
Binding(
106-
"ctrl+w", "delete_left_word", "delete left to start of word", show=False
100+
"ctrl+right", "cursor_right_word", "Move cursor right a word", show=False
107101
),
108-
Binding("ctrl+u", "delete_left_all", "delete all to the left", show=False),
102+
Binding("backspace", "delete_left", "Delete character left", show=False),
103+
Binding("home,ctrl+a", "home", "Go to start", show=False),
104+
Binding("end,ctrl+e", "end", "Go to end", show=False),
105+
Binding("delete,ctrl+d", "delete_right", "Delete character right", show=False),
106+
Binding("enter", "submit", "Submit", show=False),
109107
Binding(
110-
"ctrl+f", "delete_right_word", "delete right to start of word", show=False
108+
"ctrl+w", "delete_left_word", "Delete left to start of word", show=False
111109
),
112-
Binding("ctrl+k", "delete_right_all", "delete all to the right", show=False),
110+
Binding("ctrl+u", "delete_left_all", "Delete all to the left", show=False),
111+
Binding(
112+
"ctrl+f", "delete_right_word", "Delete right to start of word", show=False
113+
),
114+
Binding("ctrl+k", "delete_right_all", "Delete all to the right", show=False),
113115
]
114116
"""
115117
| Key(s) | Description |

0 commit comments

Comments
 (0)