[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Modifier mapping in X11
From: |
Kazunobu Kuriyama |
Subject: |
Re: Modifier mapping in X11 |
Date: |
Fri, 13 Aug 2004 03:32:49 +0900 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; ja-JP; rv:1.4) Gecko/20030624 Netscape/7.1 |
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
------------------------
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, 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.
Other than facilitating key swappings at this low level, what advantage
we can take of with this patch?