crigler / dtach

A simple program that emulates the detach feature of screen
GNU General Public License v2.0
492 stars 50 forks source link

Make escape char permanently configurable #9

Open michael-o opened 7 years ago

michael-o commented 7 years ago

Currently, the escape char is ^\ which is impossible to type in with an European keyboard layout and two keys: German, French, Italian, etc. Though, one can use -e, it is extremely exhausting to provide this every time. Therefore, I propose to either move this to a compile time option: --with-escape-char=... or have an env var for that: DTACH_ESCAPE_CHAR. It would make life way easier for non-English users.

If we agree on some option, I can try to work out a patch.

rdebath commented 7 years ago

Not a bad idea IMO, but many emulators give this control character when you press Ctrl-4 so it's shouldn't be difficult to type.

michael-o commented 7 years ago

Wow, you are right! This really works. Why does this works? One should update the docs with this. It'd be a huge help.

rdebath commented 7 years ago

The non-alphabetic control characters were mapped to the control versions of 2345678 on the VT100 all the other terminals followed because it's really easy to tell a completely new user to enter Control and a number rather than hunting up the right sort of bracket or slash.

People today, are taught the names of these characters in primary school; they still get the wrong slash though! That's Microsoft's fault.

2  ^@  \000
3  ^[  \033
4  ^\  \034
5  ^]  \035
6  ^^  \036
7  ^_  \037
8  DEL \177