nanogui: keyboard layout
Subject:
Re: [nanogui] keyboard layout
From:
"Greg Haerr" ####@####.####
Date:
7 Sep 2007 16:12:56 +0100
Message-Id: <053d01c7f161$87fe4c20$6401a8c0@winXP>
: But when
: I run nxlib and fltk, it seems if it had switced back to the original
: keyboard layout. (The keycode for the a key is always the same
: regardless of running lodkeys previously or not.)
X11, and thus NXlib, uses the scancode from the kernel, not
the translated key from the kernel keymap. This code is in
nxlib/NextEvent.c:
event->xkey.keycode = pev->scancode;
X11 programs then use XLookupKeysym() get the
translated value. There is a table in nxlib/StrKeysym.c
which you will have to replace and load from the kernel,
which will take a bit of work since it handles nano-X
MWKEY_* function/special key processing. I suggest
dyamically loading this table from the kernel, and replacing
all keys less than MWKEY_FIRST.
If you get this changed, please send a patch.
Regards,
Greg