discuss-gnustep
[Top][All Lists]
Advanced

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

Re: characters problems in terminal


From: Fred Kiefer
Subject: Re: characters problems in terminal
Date: Wed, 09 Nov 2011 22:48:50 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.23) Gecko/20110920 SUSE/3.1.15 Thunderbird/3.1.15

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.
Yes, I reverted and it works like a charm.

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.

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?



reply via email to

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