[GH-ISSUE #549] Feature request: add keybindings to InputField #402

Closed
opened 2026-03-04 01:04:39 +03:00 by kerem · 1 comment
Owner

Originally created by @minefuto on GitHub (Jan 14, 2021).
Original GitHub issue: https://github.com/rivo/tview/issues/549

Hi,

It seems InputField provides Bash-like keybinding.
It is very useful.

  • Left arrow: Move left by one character.
  • Right arrow: Move right by one character.
  • Home, Ctrl-A, Alt-a: Move to the beginning of the line.
  • End, Ctrl-E, Alt-e: Move to the end of the line.
  • Alt-left, Alt-b: Move left by one word.
  • Alt-right, Alt-f: Move right by one word.
  • Backspace: Delete the character before the cursor.
  • Delete: Delete the character after the cursor.
  • Ctrl-K: Delete from the cursor to the end of the line.
  • Ctrl-W: Delete the last word before the cursor.
  • Ctrl-U: Delete the entire line.

But it looks like the following keys are missing.

  • Left arrow: Move left by one character. <- add Ctrl-B
  • Right arrow: Move right by one character. <- add Ctrl-F
  • Delete: Delete the character after the cursor. <- add Ctrl-D

Is there a reason why it is not implemented?
I would like to suggest closer to the operation feeling to Bash keybinding.

Originally created by @minefuto on GitHub (Jan 14, 2021). Original GitHub issue: https://github.com/rivo/tview/issues/549 Hi, It seems InputField provides Bash-like keybinding. It is very useful. > - Left arrow: Move left by one character. > - Right arrow: Move right by one character. > - Home, Ctrl-A, Alt-a: Move to the beginning of the line. > - End, Ctrl-E, Alt-e: Move to the end of the line. > - Alt-left, Alt-b: Move left by one word. > - Alt-right, Alt-f: Move right by one word. > - Backspace: Delete the character before the cursor. > - Delete: Delete the character after the cursor. > - Ctrl-K: Delete from the cursor to the end of the line. > - Ctrl-W: Delete the last word before the cursor. > - Ctrl-U: Delete the entire line. But it looks like the following keys are missing. - Left arrow: Move left by one character. <- add Ctrl-B - Right arrow: Move right by one character. <- add Ctrl-F - Delete: Delete the character after the cursor. <- add Ctrl-D Is there a reason why it is not implemented? I would like to suggest closer to the operation feeling to Bash keybinding.
kerem closed this issue 2026-03-04 01:04:39 +03:00
Author
Owner

@rivo commented on GitHub (Feb 17, 2021):

I just added them.

The reason was quite simple: I didn't know about them, hadn't used them myself. ;-)

<!-- gh-comment-id:780396752 --> @rivo commented on GitHub (Feb 17, 2021): I just added them. The reason was quite simple: I didn't know about them, hadn't used them myself. ;-)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tview#402
No description provided.