I could track this down to this obscure code in TerminalParser_Linux.m
plenty of explaination, still it wont help to understand what is going
on.
{
BOOL commandAsMeta=[TerminalViewKeyboardPrefs commandAsMeta];
/*
Thanks to different keyboard layouts and dumb default key
handling
in GNUstep, this is a bit complex. There seem to be two main
cases:
a. GNUstep has been correctly configured. Command is really
command,
alternate is really alternate, and is used as meta. AltGr isn't
anything at all. No special options necessary.
b. GNUstep is using the default settings. Left alt is command,
right
alt (which might be AltGr) is alternate. Users seem to
actually want
left alt to be meta, and, if right alt is AltGr, right alt not
to be
meta. Thus, when command-as-meta option is active, we intercept
command presses and treat them as meta, and we ignore alternate.
*/
if ((commandAsMeta && (mask&NSCommandKeyMask)) ||
(!commandAsMeta && (mask&NSAlternateKeyMask)))
{
NSDebugLLog(@"key",@" meta");
[ts ts_sendCString: "\e"];
}
}
What my change in back did was to set the AltGr key as the second
Alternate key for GNUstep. Something that should be valid when done by
a user in the defaults setting. It now turns out that this did break
some obscure feature in Terminal. I call this feature obscure as it
isn't even documented in the setting panel that not selecting
command-as-meta will result in right alt (or in my case AltGr) being
used as meta. I would expect that Esc is used as meta, but this may be
mapped to double Esc, which is why another meta key seems to be needed.