Adding additional bindings for widget.Input
Opening up dialog to discuss possible widget.Input bindings. I'd be happy to implement them, and already have a few on my local fork
Proposed action and accompanying shortcut
- Clear line ✅
- Shift+Delete (up for debate)
- Backspace (Word at a time)
- Ctrl+Backspace
- Delete forward (Word at a time)
- Ctrl+Delete
- Move Cursor (Word at a time) ✅
- Ctrl+Left
- Ctrl+Right
Besides the clear line action, "these are universal shortcuts."
There's a discussion to be had here regarding what we consider universal to be. Are we treating widget.Input like we might an html input box? If so, the proposed shortcuts would qualify.
While trying to implement ctrl+backspace, I noticed an interesting interaction with widget.Input
- Any unbound bindings (key combinations) have no effect on
Input- For example,
ctrl+leftdoes nothing bc it doesn't have a binding action.
- For example,
- This is not the case with backspace though.
ctrl+backspaceandshift+backspaceare functionally the same asbackspace
+1 for adding extra bindings. I think the Emacs-style key bindings are pretty much the standard in macOS and Linux systems. Text input widgets in almost all GUI programs support that. Would be great to support a subset of this cheatsheet: https://readline.kablamo.org/emacs.html
(Just checking some older issues) Many more actions and bindings were added to Input in 0.11.0.