Terminal emulator/xterm/stty confusion: trying to get Ctrl-Backspace behaving like GUI-native apps

Woah! I think I just put together a really elegant work-around (at least for me and my use case)!

I found some people saying that PuTTY doesn’t support all the proper inputs. Some suggested using KiTTY, but this is problematic for me since I like to use mRemoteNG, which uses a PuTTY fork, PuTTYNG. I looked into why they were saying it, and found that PuTTY doesn’t have a way to configure Ctrl modifier nicely. I thought “that’s pretty lame” and started looking into suggested solutions.

1 person suggests using AutoHotkey. I use a lot of AutoHotkey functions already, so I looked into modifying his code to work for my purpose. I figured the easiest solution would be to remap to the already built-in Ctrl-w, so I went with that.

; mRemoteNG remap Ctrl-Backspace to Ctrl-w
#IfWinActive ahk_class PuTTYNG
^Backspace::SendInput, ^w
#IfWinActive

For users of regular PuTTY, just delete the NG. I’ve already inspected the ahk_class to validate.

I’m curious if this method will have any negative effects long-term, such as if an application like vim or emacs or something interprets Ctrl-w differently than xterm. I also imagine that this may come to bite me when I’m doing occasional RDP connections, but that is fairly rare for me.

Even the default stty, at least for my system, werase is set to ^W, so I can now remove the ^H configuration and stop trying to figure out how to reconfigure xterm.

Unrelated curiousity, the original suggestion sent some ASCII instead like {esc}[1;2D. {esc} is AHK for the escape key, but I don’t understand what [1;2D sends. Anyone know a resource I can look up to understand how to convert this ASCII to something readable? Although AHK documentation suggests a different way to send ASCII.

edit > nvm about the potential RDP issue. ahk_class for that is WindowsForms10.Window.8.app.0.3b93019_r7_ad1, or may be different for different Windows versions given that weird string.