Hotkey for Erasing a Word of Input

Posted by Mleo2003 on Sun 31 Jul 2022 02:41 AM — 2 posts, 9,959 views.

#0
I'm wondering how difficult it would be to change the behavior of the Control+Backspace hotkey to do as I can in other editors and delete the last word up till the first non-word character. Currently the behavior is Control+Backspace reinserts the last word from the previous sent command.

Some programs also will use Alt+Backspace for this, but Mushclient currently has that recall the full command previously sent as well.

I saw some functions to get the current text in the input field, and of course there's Regex to find the last word to know at least how much to chop from the end of the string. I just wasn't sure if that's the expected route to go, or if I missed some input config to change this behavior.
Australia Forum Administrator #1
See: https://www.gammon.com.au/forum/?id=14021&reply=4#reply4

You could put that into a plugin, or in your script file.