Skip to content

Commit 3da0a4f

Browse files
authored
Merge pull request #5484 from ddkasa/input-binding-desc
Input 'right' Binding Description & Documentation
2 parents 4aac6eb + b4e5133 commit 3da0a4f

File tree

2 files changed

+87
-73
lines changed

2 files changed

+87
-73
lines changed

src/textual/widgets/_input.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,12 @@ class Input(ScrollView):
8484
"Move cursor left a word and select",
8585
show=False,
8686
),
87-
Binding("right", "cursor_right", "Move cursor right", show=False),
87+
Binding(
88+
"right",
89+
"cursor_right",
90+
"Move cursor right or accept the completion suggestion",
91+
show=False,
92+
),
8893
Binding(
8994
"shift+right",
9095
"cursor_right(True)",
@@ -123,18 +128,27 @@ class Input(ScrollView):
123128
| Key(s) | Description |
124129
| :- | :- |
125130
| left | Move the cursor left. |
131+
| shift+left | Move cursor left and select. |
126132
| ctrl+left | Move the cursor one word to the left. |
127133
| right | Move the cursor right or accept the completion suggestion. |
134+
| ctrl+shift+left | Move cursor left a word and select. |
135+
| shift+right | Move cursor right and select. |
128136
| ctrl+right | Move the cursor one word to the right. |
129137
| backspace | Delete the character to the left of the cursor. |
138+
| ctrl+shift+right | Move cursor right a word and select. |
130139
| home,ctrl+a | Go to the beginning of the input. |
131140
| end,ctrl+e | Go to the end of the input. |
141+
| shift+home | Select up to the input start. |
142+
| shift+end | Select up to the input end. |
132143
| delete,ctrl+d | Delete the character to the right of the cursor. |
133144
| enter | Submit the current value of the input. |
134145
| ctrl+w | Delete the word to the left of the cursor. |
135146
| ctrl+u | Delete everything to the left of the cursor. |
136147
| ctrl+f | Delete the word to the right of the cursor. |
137148
| ctrl+k | Delete everything to the right of the cursor. |
149+
| ctrl+x | Cut selected text. |
150+
| ctrl+c | Copy selected text. |
151+
| ctrl+v | Paste text from the clipboard. |
138152
"""
139153

140154
COMPONENT_CLASSES: ClassVar[set[str]] = {

0 commit comments

Comments
 (0)