Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Mar 2010 03:04:15 -0800 (PST)
From:      Hubert Tournier <hubert@frbsd.org>
To:        freebsd-emulation@freebsd.org
Subject:   Re: [PATCH] VirtualBox headless VNC support by LibVNCServer
Message-ID:  <27792574.post@talk.nabble.com>
In-Reply-To: <5105480CD1D946D4AC57E4ADDD23626B@artemis>
References:  <18D68DBE18AC435984C5F66597A869D3@artemis> <27587832.post@talk.nabble.com> <EF4FC9E60356421582CE72C0A3DF45B8@artemis> <27676863.post@talk.nabble.com> <27787769.post@talk.nabble.com> <5105480CD1D946D4AC57E4ADDD23626B@artemis>

next in thread | previous in thread | raw e-mail | index | archive | help

Hello Daisuke,


Daisuke Aoyama wrote:
> 
> It looks better. But where are right side Ctrl key and Alt key?
> First, I have not understood the meaning of "Alt Gr".
> After I had retrieved it with Google, I found this page.
> http://en.wikipedia.org/wiki/Keyboard_layout#United_States
> Then, I realized that it mean special key.
> 

Well, the right Alt key doesn't always exist. In fact, it doesn't on all the
keyboard layouts for Latin alphabetic scripts *except* the US keyboard
layout (which, like the Wikipedia page you found says, "has a second Alt key
instead of the AltGr key and does not use any dead keys, and thus offers no
way of inputting any sort of diacritic or accent; this makes it unsuitable
for all but a handful of languages")!

After much testing, here's what I found (may be dependent on my client
software: VNC Viewer Free Edition for Windows, v4.1.3):

1/ when you press AltGr, it generates XK_Control_L and XK_Alt_R keysyms
(apparently, sometimes in the other order!) events, at keyboard repeat rate
while the key is down;

2/ the keysyms are correctly generated for the keys normally accessible
through AltGr;

3/ in order for the AltGr-Key sequence to work, we should only generate
XK_Alt_L and the desired key (generating the additional XK_Control_L
scancode makes the AltGr-Key sequence fail).

So the best solution I found was to ignore completely the AltGr keysyms, and
generate the scancode for XK_Alt_L only when the key pressed with AltGr was
found in the Alt column of the keymap file (which should work with most
international keyboard layouts).

That's why I had to load at least this other column from the keymap file and
modify the keysym2scancode function in order to retrieve the column where
the key was found. On the other hand, I decided to leave the five other
keymaps columns (especially the one after Alt) because of parasitic effects
with some keys (for example 
http://en.wikipedia.org/wiki/Keyboard_layout#French "&gt; &lt;" ).

For the right side Ctrl key, I don't remember if it was really needed to
nullify it. I suspect it could be treated like you did originally. I will
test it soon.

Best regards,

Hubert

PS: here's a link to a page I found useful on 
http://www.win.tue.nl/~aeb/linux/kbd/scancodes.html keyboard scancodes .
-- 
View this message in context: http://old.nabble.com/-PATCH--VirtualBox-headless-VNC-support-by-LibVNCServer-tp27288796p27792574.html
Sent from the freebsd-emulation mailing list archive at Nabble.com.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?27792574.post>