nanogui: Re: International keyboard support


Previous by date: 25 Jul 2011 22:25:07 -0000 Re: International keyboard support, Georg Potthast
Next by date: 25 Jul 2011 22:25:07 -0000 Re: Return to text mode, Greg Haerr
Previous in thread: 25 Jul 2011 22:25:07 -0000 Re: International keyboard support, Georg Potthast
Next in thread: 25 Jul 2011 22:25:07 -0000 Re: International keyboard support, Greg Haerr

Subject: Re: [nanogui] International keyboard support
From: "Greg Haerr" ####@####.####
Date: 25 Jul 2011 22:25:07 -0000
Message-Id: <B82A514838754E359BCB8A135455D5BF@winXP>

:I looked at the code in StrKeysym.c in NXlib. It seems that the function
: LoadKernelKeymaps(void) opens the keyboard as a file and reads all the
: keymaps from that using an ioctl() call. This will not work this way with
: DOS.

That code will have to be removed using #ifdef'd out for your
DOS  port.


:
: Do I have to disable that function and edit the mwscan_to_mwkey[128] array
: and the /* translate Control/Shift*/ part in XLookupString() to e.g. a
: German keyboard?

Yes.  You might have a couple of possible mwkey arrays for different
keyboard layouts/languages.  Then each one could be compiled in
for the locale being used.  Basically, the keyboard file won't be read
in from the OS, but compiled in statically.

You shouldn't have to modify the Control/Shift code however,
as this just applies the modstate parameter to the key value
to produce various control-/shift- variations of the keys (alpha
characters are handled seperately in the scan table)


: By the way, the function XLookupString() should return a one instead of 
zero
: and return the translated character in buffer to be compatible with Xlib.
: Plus the current function XKeycodeToKeysym() will always return lower case
: letters and not support upper case.

Go ahead and fix this with your patch, thanks!

Regards,

Greg 


Previous by date: 25 Jul 2011 22:25:07 -0000 Re: International keyboard support, Georg Potthast
Next by date: 25 Jul 2011 22:25:07 -0000 Re: Return to text mode, Greg Haerr
Previous in thread: 25 Jul 2011 22:25:07 -0000 Re: International keyboard support, Georg Potthast
Next in thread: 25 Jul 2011 22:25:07 -0000 Re: International keyboard support, Greg Haerr


Powered by ezmlm-browse 0.20.