jcubic / jquery.terminal

jQuery Terminal Emulator - JavaScript library for creating web-based terminals with custom commands
https://terminal.jcubic.pl
MIT License
3.11k stars 569 forks source link

Add CTRL+BACKSPACE to default keymap for backward word delete #920

Closed cowuake closed 5 months ago

cowuake commented 5 months ago

I have an idea for a new feature for jQuery Terminal

Premise

As of today, it seems that the user is not able to (backward) delete a word on common desktop browsers (Firefox, Chrome, Edge), which take priority over keyboard events and prevent using, e.g., the CTRL+W shorcut.

Proposal

Since CTRL+BACKSPACE is an even more common shortcut for the same purpose and usually available on CLIs, here is made the proposal to include it in the default keymap. I can open a PR myself, including this change.

Expected impact

Since there is no remapping involved, but only the addition of a new shortcut made available by default, the impact should be minimal and limited to a fairly improved comfort for the generic user.

jcubic commented 5 months ago

Good idea, this is not part of Bash, but it's default in Emacs (a lot of shortcuts in Bash came from Emacs).

jcubic commented 5 months ago

Please don't close, I keep the issue open until it land on master and is released. That's why I added a label resolved.

cowuake commented 5 months ago

Sorry for the hassle, I will keep that in mind next time.