nanogui: Thread: Re: International keyboard support


[<<] [<] Page 1 of 1 [>] [>>]
Subject: Re: [nanogui] International keyboard support
From: "Georg Potthast" ####@####.####
Date: 18 Jul 2011 17:08:05 -0000
Message-Id: <002101cc456d$400457c0$6a00a8c0@SCHREIBTISCHGP>

Hi Greg,

if not running on top of X Windows is there support for international 
keyboards? I mean can Nano-x use any keyboard mapping files used by X 
Windows directly?

Or shall this be implemented in the keyboard driver in the drivers 
directory?

Georg 

Subject: Re: [nanogui] International keyboard support
From: "Georg Potthast" ####@####.####
Date: 23 Jul 2011 14:42:16 -0000
Message-Id: <003b01cc4946$a6b4d8f0$6a00a8c0@SCHREIBTISCHGP>

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.

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? Or is there a different solution?

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.

Georg 

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 

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

: if not running on top of X Windows is there support for international 
: keyboards? I mean can Nano-x use any keyboard mapping files used by X 
: Windows directly?

As you saw in nxlib/StrKeysyms.c, the keyboard mapping files
aren't coming from X11, but from Linux.  Thus they will need
to be replaced as discussed in the previous email, in this file.




: 
: Or shall this be implemented in the keyboard driver in the drivers 
: directory?

Microwindows-only scancode conversion to international keyboards
can be added in the drivers/kbd_ttyscan.c file, but this won't
affect the X11 translation for nxlib.  Ideally, NXLIB should query
microwindows for the current scancode table, rather than getting
it from the OS.  For the time being, you could put the table in 
a .h file, and we'd include that same file in both places.

Regards,

Greg

[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.