discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: characters problems in terminal


From: Riccardo Mottola
Subject: Re: characters problems in terminal
Date: Thu, 10 Nov 2011 09:32:42 +0100
User-agent: Mozilla/5.0 (X11; NetBSD i386; rv:6.0.1) Gecko/20111012 Thunderbird/6.0.1

Hi
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.
The more I think about it, the more what Alex wrote is right:
AltGr (but not right alt) -> not meta, not command, nothing
Right-Alt or Left-Alt -> meta
some other key -> command

I may want left-alt to be command, but in that case, if I have AltGr I must loose meta, I can only use this setting if I have a proper right-Alt

What do you think about that?

Riccardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]