FluentTerminal icon indicating copy to clipboard operation
FluentTerminal copied to clipboard

Support Ctrl+Backspace to delete word

Open moigagoo opened this issue 6 years ago • 11 comments

It's probably an XTerm.js issue, so feel free to close this one if it's the case.

moigagoo avatar Apr 17 '18 17:04 moigagoo

That's something you would need to configure in your shell, or maybe add some kind of 'per shell' keyboard aliases to Fluent Terminal. What shell are you using?

felixse avatar Apr 17 '18 18:04 felixse

Crtl + Backspace is a standard Windows shortcut, it works across all apps including PowerShell and cmd. However, xtermjs seems to not support it. Hyper doesn't support it either, for example.

Since you asked, I'm using pwsh.

moigagoo avatar Apr 18 '18 08:04 moigagoo

Bash in the WSL Ubuntu 18.04 obeys Alt+Backspace, so this is likely less of a "Does the terminal emulator pass my keystrokes correctly" and more of a "What does your shell do with the keystrokes" question.

Riebart avatar Jun 10 '18 00:06 Riebart

When i try to ctrl + backspace in the Bash on WSL Ubuntu 18.04 it will onlydelete the last character like when i use backspace without ctrl. I tried bash, zsh, fish ans dash and all have the same behaviour.

subhead avatar Nov 23 '18 13:11 subhead

Try Alt+Backspace, see if that works.

Riebart avatar Nov 23 '18 18:11 Riebart

yes alt + backspace works. thanks.

subhead avatar Nov 25 '18 12:11 subhead

Can you explain why this is mapped to alt + backspace instead of the usual ctrl + backspace and how/where this is configured? Thanks

alexknips avatar Mar 27 '19 13:03 alexknips

in xterm.js: https://github.com/xtermjs/xterm.js/blob/509ce5fa3a698ee7847419117e9dd6b979b105bf/src/core/input/Keyboard.ts#L90

We could either start a discussion there or create a workaround in attachCustomKeyEventHandler on our site

felixse avatar Mar 27 '19 15:03 felixse

Thanks for the quick reply. Obviously it would be nice if they could make these keyboard shortcuts configurable

alexknips avatar Mar 27 '19 15:03 alexknips

This is a major deal breaker for me, since I use this shortcut so often. Alt+ backspace does not work for me. It gives me this weird character, image

Found a workaround.

  1. Use Ctrl + w instead of Ctrl+Backspace.

  2. Use autohotkey to remap Ctrl + Backspace to Ctrl + w keyboard shortcuts - Use Ctrl+Backspace to delete word in Windows command line? - Super User https://superuser.com/questions/224481/use-ctrlbackspace-to-delete-word-in-windows-command-line

onguarde avatar Sep 11 '20 10:09 onguarde

Alt + backspace doesn't work for me neither. I don't understand why it is so difficult to implement this. In Windows all consoles (cmd, Powershell) support this.

DennisKassel avatar Jul 27 '21 11:07 DennisKassel