qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stuart Brady <sdbrady@ntlworld.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] qemu kbd emulation
Date: Wed, 28 Jun 2006 16:05:00 +0100	[thread overview]
Message-ID: <20060628150459.GA3867@miranda.arrow> (raw)
In-Reply-To: <200606281416.57021.zswi@pers.pl>

On Wed, Jun 28, 2006 at 02:16:56PM +0200, Rafa?? Cygnarowski wrote:
> So now I have to find out:
> - where those fake keycodes were dropped,

I'm not sure.

> - why after loading my test program those two 8s are displayed 
>   (there is some unneeded interrupt generated - am I right?).

8 is on the same key as "up" on the numeric keypad.

> Honestly, I don't know where I should start looking...

Have you tried toggling numlock?

The URL I posted might help -- especially the bit about fake shifts.

The output you're getting is:

    e0 e0 48 e0 e0 aa

but you should get:

    e0 2a e0 48 e0 c8 e0 aa

So you're losing 2a (which after e0 would fakes pressing shift) and then
c8 (which would release the up key itself).

(BTW, it'd be easier if you used hexadecimal in your output.)

It seems that having the MSB bit set in the output of
sdl_keyevent_to_keycode() means that it's one of the 'e0'-escaped keys
(mostly the 'grey' versions of the numeric keypad keys)... and the MSB
in the final keycode is set if the key is being released, otherwise
it's cleared.

I can't see anything wrong... but I'm not sure if you're adding code in
the wrong place.  QEMU uses PC keycodes internally but I'm not sure this
should go as far as including fake shifts -- either way, you'll probably
need to look at hw/ps2.c.

I don't know much about PS/2, unfortunately, but hw/ps2.c seems to
translate keycodes from set 1 to set 2, and they get converted back to
set 1 elsewhere.  Maybe that's where the bug is?
-- 
Stuart Brady

  parent reply	other threads:[~2006-06-28 15:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-28  8:27 [Qemu-devel] qemu kbd emulation Rafał Cygnarowski
2006-06-28  8:39 ` Oliver Gerlich
2006-06-28 12:16   ` Rafał Cygnarowski
2006-06-28 14:28     ` Jim C. Brown
2006-06-28 17:27       ` Rafał Cygnarowski
2006-06-29 20:56       ` Rafał Cygnarowski
2006-06-28 15:05     ` Stuart Brady [this message]
2006-06-28  9:39 ` Stuart Brady
2006-06-28 10:07 ` Stuart Brady
2006-06-28 11:17   ` Rafał Cygnarowski

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=20060628150459.GA3867@miranda.arrow \
    --to=sdbrady@ntlworld.com \
    --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).