discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Problem with locale and keyboard


From: Adrian Robert
Subject: Re: Problem with locale and keyboard
Date: Mon, 4 Oct 2004 09:54:31 -0400


On Sep 28, 2004, at 9:40 PM, Rob Burns wrote:
I'm using cvs from a couple days ago, and recently started having problems with modifier keys. If I would like to press 'command-A' (alt-shift-a on my keyboard), I now have to press alt first, then shift, then a. previously I was pressing shift first, though I think it worked in the reverse order as well.

Currently, after pressing that key combination, my keyboard will be stuck in 'command-lock' mode until I hit the alt key again. meaning, that whenever I hit a character, its interpreted as if the command key was also being pressed. I don't have any of these problems if the shift key is not involved. ie, pressing alt-a works as expected.

OK, I managed to replicate this on my machine and track it down. I'm using an Apple keyboard with 'alt' in small letters at the top of the 'option' key. If I hit option alone, I get Alt_L out of X. If I hit shift, then option, I get Meta_L. If I hit option then shift, it is considered Alt_L with a shift. Furthermore, once both shift and option are depressed, and you lift up on the option key first, you get a Meta_L-up. If you lift up on shift first, you get an Alt_L-up.

You can verify that this is behind your behavior by running "xev" and experimenting with the combinations above. The problem did not occur in GNUstep when modifiers were considered keycodes because the keycode for 'option' is the same no matter if shift is pressed or not.

This is a situation that Kazunobu Kuriyama pointed out, but I didn't fully see the implications of. I think technically, the new implementation follows X most closely, however this is perhaps not desirable in this particular case. There are three solutions that I can think of. One is to revert to the old behavior of basing mapping on key codes. This has disadvantage of ignoring the user's X modifier mapping settings as I originally complained of (but maybe the medicine is worse than the disease). Another is to add a new back default "IgnoreShiftForModifiers" which sets the behavior to treat the Meta_L as Alt_L (unshifted). This should be easy to implement. Finally one could work around the issue in particular cases by using xmodmap with a line like ('keycode 64 = Alt_L Alt_L', perhaps paired with 'keysym Alt_L = Alt_L Meta_L' to retain some meta capability) to obliterate the shifted mapping.

I don't know which is best. Can anyone who relies on shifted-modifiers on a regular basis state what they are used for and which of the above options would interfere least with this usage?

thanks,
Adrian





reply via email to

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