From: Fabrice Bellard <fabrice@bellard.org>
To: Juergen Keil <jk@tools.de>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Keyboard problem in qemu 0.6.0-2
Date: Fri, 03 Sep 2004 22:44:29 +0200 [thread overview]
Message-ID: <4138D7AD.4010208@bellard.org> (raw)
In-Reply-To: <200409031738.i83HcZLj023692@tiger2.tools.intra>
I'll try to merge parts of the VNC patch to solve the problem (rdesktop
keyboard mappings support).
Fabrice.
Juergen Keil wrote:
>
>>I have similar problems with a Solaris10_x86 host running QEMU 0.6.0
>>when displaying to the default Xsun X-Server at ':0.0' or forwarding to
>>my SPARC machines running several Solaris versions.
>>
>>These problems make QEMU (any Guest OS's command line, any input fields)
>>completely unusable.
>
>
> Yep, I noticed that problem, too. On a Solaris9_x86 host / Xsun.
>
>
> The root cause is probably the sdl.c:sdl_keyevent_to_keycode() subroutine
> that assumes X11 keycodes can be converted to PC scancodes by substracting
> 8 from the X11 keycode (for keycodes in the range 8..96):
>
>
> static uint8_t sdl_keyevent_to_keycode(const SDL_KeyboardEvent *ev)
> {
> int keycode;
>
> keycode = ev->keysym.scancode;
>
> if (keycode < 9) {
> keycode = 0;
> } else if (keycode < 97) {
> keycode -= 8; /* just an offset */
> } else if (keycode < 158) {
> /* use conversion table */
> keycode = x_keycode_to_pc_keycode[keycode - 97];
> } else {
> keycode = 0;
> }
> return keycode;
> }
>
>
> I guess that (``scancode = keycode - 8'') only works with an XFree86 X11
> server.
>
>
> My current workaround is to compile sdl.c with CONFIG_SDL_GENERIC_KBD
> defined. This enables a more accurate X11 keysym to PC scancode translation
> table. Problem is, the translation table assumes a US keyboard layout.
>
>
>
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
>
>
next prev parent reply other threads:[~2004-09-03 20:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-03 17:38 [Qemu-devel] Keyboard problem in qemu 0.6.0-2 Juergen Keil
2004-09-03 20:06 ` Bochnig, Martin
2004-09-03 20:22 ` Bochnig, Martin
2004-09-03 20:44 ` Fabrice Bellard [this message]
2004-09-06 14:16 ` Johannes Schindelin
2004-09-07 13:27 ` Johannes Schindelin
[not found] <200409032051.i83KpOLj027201@tiger2.tools.intra>
2004-09-03 21:11 ` Bochnig, Martin
[not found] <ksadil@bigpond.net.au>
2004-09-04 1:07 ` Kim Adil
2004-09-03 11:54 ` Mark Williamson
2004-09-04 2:07 ` Kim Adil
2004-09-03 12:28 ` Mark Williamson
2004-09-04 2:34 ` Kim Adil
2004-09-04 2:38 ` Kim Adil
2004-09-04 4:26 ` Kim Adil
2004-09-03 17:13 ` Bochnig, Martin
2004-09-03 17:33 ` Bochnig, Martin
2004-09-04 1:53 ` Kim Adil
2004-09-04 7:18 ` Bochnig, Martin
2004-09-04 7:55 ` Bochnig, Martin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4138D7AD.4010208@bellard.org \
--to=fabrice@bellard.org \
--cc=jk@tools.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).