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:18:22 +0100
User-agent: Mozilla/5.0 (X11; NetBSD i386; rv:6.0.1) Gecko/20111012 Thunderbird/6.0.1

Hi,

I checked "System preferences" and I have no setting (= everything is set to "None") this means I am using GNustep's default.

On 11/09/11 22:48, Fred Kiefer wrote:
On 09.11.2011 16:16, Riccardo Mottola wrote:
Most likely this was caused by my recent change in gui to use AltGr as
Alternate key. Could you locally test if undoing this change (it was
in XGGServerEvent.m) resolves the problem for you? If this is the case
I will have to undo my change and add some more comments on how to set
the key definitions to something sensible.
Actually, do you think this is correct? I checked that, for example, on Windows "Alt-F" opens the file menu, but AltGr-F does not.
This is true under GTK applications like Thunderbird too.


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.
Well, to be honest i never used those features. I think it is wrong to "force" AltGr here But I wonder if AltGr can be distinguished from Right-Alt? I expect them to be different keys.

Riccardo


Before I revert my change I really would like to know which other key I should map to Alternate on a German keyboard. What are other people out there using?
Ideally, I would use windows key as command and Left-Alt as alternet (emulating Mac/Next behaviour) and give a use to that offending-labeled key on my keyboard. :)

Riccardo




reply via email to

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