gnustep-dev
[Top][All Lists]
Advanced

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

Re: Modifier mapping in X11


From: Adrian Robert
Subject: Re: Modifier mapping in X11
Date: Thu, 12 Aug 2004 16:15:11 -0400

Looks like a sort of design change rather than a bug fix. Though I'm not sure whether letting GNUstep depend on X11 explicitly is the right thing
to do in this particular case,

This is a patch just to part of the X-windows back-end used on Unix/Linux systems, not the "GUI" or "Base" libraries that implement the OpenStep standard.


 if GNUstep should do this, I feel your patch
needs to deal with MappingNotify as well for completeness so that GNUstep can properly handle mapping changes via xmodmap or utilities similar to it.

You are right..  I will look into this; I think it's an easy fix.


Other than facilitating key swappings at this low level, what advantage
we can take of with this patch?

None. It only helps you if you happen have two keys mapped to the same symbol, like CapsLock and left-control both being mapped to Control_L that many people do to improve ergonomics. It also makes GNUstep apps behave more like other X apps without interfering with "GNUstep behavior".

Please let me know if you try the patch with any success..


Adrian



On Aug 12, 2004, at 2:32 PM, Kazunobu Kuriyama wrote:

Adrian Robert wrote:

After wondering for a while why emacs-like keybindings were defined in my DefaultKeyBindings.dict but not showing up in any apps, I realized that GNUstep was apparently not picking up my keymap modifications set either with xmodmap or in the XFree86 config file. E.g., I map my caps-lock key to another left-control, but GNUstep apps don't pick up control commands, instead inserting characters into the text, as in "".

I traced this to X11/XGServerEvent.m in 'back'. It checks modifier status by first converting the defaults like "GSFirstControlKey" into single X KeyCodes on init, then comparing KeyCodes received from the X server with these. The problem is that X conceptually maps modifiers to KeySyms, not KeyCodes. ...


Is there any reason not to make this change? Will it interact badly with any locale / input method code? If not and no one else wants to do it I can take a stab at this and send out a patch for people to try..


Here is the patch referred to. Apply in gnustep/core/back using '-p0'.

I've only tested this on my locale="C" machine, so if anyone is using a different locale and/or especially a different input method their testing would be most welcome..

thanks,
Adrian

------------------------





reply via email to

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