qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] qemu curses driver


From: andrzej zaborowski
Subject: Re: [Qemu-devel] qemu curses driver
Date: Sun, 11 Dec 2005 01:11:34 +0100

Hi,
thanks for feedback!

On 10/12/05, Johannes Schindelin <address@hidden> wrote:
>
> A few questions:
>
> - why do you enable it only if the target cpu is i386?

I didn't have any software that runs on different architectures to
test, and I remember that there were linking problems for sparc (I
think) because it didn't use the VGA emulator, which the curses driver
depends on (SDL driver depends on it too). I'm going to look at it
closer and enable curses for all targets that might work with curses.

> - is it possible to scroll inside the window?
>   (I started qemu in a 80x24 window, but the guest expected 80x25, so I
>    could not see the last line)

I'm afraid the only way to see the last line in this case is by
enlarging the window (this shouldn't need restarting qemu, also most
terminal emulators and GNU screen support that). Native consoles
usually use 80x25 anyway so I didn't find use for scrolling inside the
guest screen, and I assumed working with the virtual machine would be
a bit difficult when you're only seeing a fragment of the screen.

> - any reason the Escape key does not work?

Hm. I checked it in several terminal emulators and it always worked
fine. Each time I ran the "Learn Keys" option in Midnight Commander
inside the guest system and it would correctly recognise all keys
except F19 and F20 (which I fixed now). I also fixed a small issue
with the Enter key.
Note that on Linux you sometimes have to wait half a second before the
system reacts to Escape (only the guest system, I disabled this delay
on the host). Also note that leaving the Midnight Commander's builtin
viewer/editor requires double Escape.

> > The qemu consoles work just like with the SDL interface, except you
> > switch them with Alt+Number instead of Ctrl+Alt+Number because ncurses
> > doesn't detect Ctrl and Alt keys together. So usually the virtual
> > machine screen is at Alt+1, the qemu console at Alt+2, serial console
> > at Alt+3 and parallel console at Alt+4.
>
> Is it not possible to have the same key binding?

Unfortunately terminals don't receive any input when you're pressing
both Control and Alt and some other key, so I'm afraid it is not
possible.

> > Resizing the terminal (like when resizing the xterm window) is handled
> > (at least with ncurses, this may not be implemented in other curses
> > libraries).
>
> I have ncurses installed and it did not work. Have to investigate.

I was trying to find out when ncurses registers its own handler for
SIGWINCH (the signal that's sent when the terminal is resized) and
when it doesn't do that, and I couldn't because the documentation is
vague about it (it only says "ncurses can be configured to provide a
handler for SIGWINCH" in all places in the documentation). As it
worked fine on my system, I decided I would leave all signals handling
tasks to ncurses to avoid #ifdefs excluding the signals handling code
when compiling for Ms Windows.
Now I found out that it is a compile time switch for the "configure"
script of ncurses that controls this behavior. So I'm going to add my
own SIGWINCH handler to make sure it works the same way with all
versions of ncurses in all cases. Hopefully I will send a corrected
patch tomorrow.

Thanks for the positive opinion and for testing it, your remarks
turned out very useful. I will be glad if you can also see how the
corrected version works when I get it ready.
Cheers
--
balrog 2oo5

Dear Outlook users: Please remove me from your address books
http://www.newsforge.com/article.pl?sid=03/08/21/143258




reply via email to

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