MobaXTerm – Fix Ctrl-Del Key Combination Not Deleting Word in SSH Sessions

keyboard shortcutsmobaxtermputtyssh

I recently stared using MobaXTerm to manage my homelab sessions and I ran into an issue. Normally in Linux, the Ctrl+Del key combination should delete the next word, but in MobaXTerm this is not working. I have tried all possible terminal type values like xterm, xterm-256color, putty and more, but no luck.

This Github issue from oh-my-zsh (https://github.com/ohmyzsh/ohmyzsh/issues/4872) hints this is an issue with Putty, as MobaXTerm is based on it I believe. I tried the troubleshooting steps described there using showkey -a. Combinations like Ctrl+C or Ctrl+a show up correctly as ^C and ^A, but Ctrl+Del does not result in any output.

I hope you guys can help me fix this issue, if it can even be fixed at all.

Best Answer

The terminal emulator code used by MobaXTerm (which seems like it might have been taken from PuTTY) doesn't support that key combination and doesn't send any keycode. There does not seem to be any configuration available in MobaXTerm for its terminal behavior (not even the ability to assign key shortcuts for macros), so you can't really fix this except by contacting the MobaXTerm developers and asking them to add it.

(The key code for Ctrl+Del follows the same "Xterm modifiers" format as Ctrl+PgUp/PgDn, being ESC[3;5~ while the base Del keycode is ESC[3~.)

I have tried all possible terminal type values like xterm, xterm-256color, putty and more, but no luck.

These options only set TERM values that are used to inform programs what to expect from the terminal. They don't alter the way the terminal itself behaves. If it doesn't send anything for a particular key, no amount of changing TERM can make it do so.

Related Question