[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] ui/cocoa.m: Give laptop users ability to scroll

From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH] ui/cocoa.m: Give laptop users ability to scroll in monitor
Date: Mon, 11 May 2015 08:53:40 +0200

On So, 2015-05-10 at 23:51 +0100, Peter Maydell wrote:
> On 10 May 2015 at 23:34, Peter Maydell <address@hidden> wrote:
> > I've now tested again with my not-just-the-laptop setup, and:
> >
> >  * in the guest OS (I tested with a Linux guest), PageUp/Down
> >    work OK and work the same whether I use an external USB
> >    keyboard with a physical PgUp/Down key or the MacBook Air's
> >    keyboard with Fn+UpArrow/Fn+DownArrow as the chord to
> >    input pageup/down
> >  * in the monitor window, neither way of inputting PageUp/Down
> >    works: all you get is a ',' input into the monitor
> >
> > So my conclusion is that we should fix the underlying
> > problem that the monitor isn't handling PgUp/PgDown
> > correctly (not sure exactly why that's not working yet).
> So looking at the code in ui/console.c that implements our
> virtual consoles, the scrolling is hooked up to the keycodes
> to be output by one of our UI frontends, SDL.
> Gerd, how is this supposed to work? Shouldn't something
> in the generic console code be handling converting the
> what the vc layer expects, rather than having each of the
> ui frontends doing it?

Unfortunaly it isn't that easy as we have two very different modes of
operation here:  For vc's we need the keyboard input already mapped to
your local keyboard layout (i.e. the keysyms).  For guest input we need
the raw scancodes of the keys as the keyboard layout handling is done by
the guest.  The differences between the UIs (especially when it comes to
raw scancodes) are big enough that it is next to impossible to hide all
that in common code.

Specifically for the vc control keys there is a little helper function
though: kbd_put_qcode_console(), used by sdl2 and gtk, which might be
useful for cocoa too.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]