Mailing List Archive

Handling Key Sequence
Hi everybody !

I am using xen-2.0.7, and wondered where, in the source code, is located
the lines that fetch the key sequence "Ctrl ]" that escape from the connected
Xen virtual console.
Indeed I want to add another key sequence. I spent a long time to search where
it is located in the code, without success. So if someone know where it is, I
will appreciate a lot :).

I searched in most of files of Xend, because I think that keyboard interrupts
are always forwarded by xen to dom0, even if the active console is owned by a
domU. Then I think that the "real" keyboard driver forwarded the scan code or
ASCII code to Xend, which sends them to the active console. And maybe before
sending the ASCII codes it checks if the key sequence is "Ctrl ]" and switch
console. Am I right ?

So where are these lines that check the key sequence and switch console ?

Thanks.

--
Nicolas CLERMONT

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Re: Handling Key Sequence [ In reply to ]
tools/console/client/main.c

Look for ESCAPE_CHARACTER.

-- Keir


On 18/9/06 15:33, "nicko.koinkoin@free.fr" <nicko.koinkoin@free.fr> wrote:

>
>
> Hi everybody !
>
> I am using xen-2.0.7, and wondered where, in the source code, is located
> the lines that fetch the key sequence "Ctrl ]" that escape from the connected
> Xen virtual console.
> Indeed I want to add another key sequence. I spent a long time to search where
> it is located in the code, without success. So if someone know where it is, I
> will appreciate a lot :).
>
> I searched in most of files of Xend, because I think that keyboard interrupts
> are always forwarded by xen to dom0, even if the active console is owned by a
> domU. Then I think that the "real" keyboard driver forwarded the scan code or
> ASCII code to Xend, which sends them to the active console. And maybe before
> sending the ASCII codes it checks if the key sequence is "Ctrl ]" and switch
> console. Am I right ?
>
> So where are these lines that check the key sequence and switch console ?
>
> Thanks.
>
> --
> Nicolas CLERMONT
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Re: Handling Key Sequence [ In reply to ]
First thanks for your quick answer. Unfortunately, I think we don't talk about
the same version of xen. Indeed, I do not have tools/console/, and a
grep -r "ESCAPE_CHARACTER" xen-2.0/ doesn't find anything.

So if anyone else has another advice...

thanks again.

>
> tools/console/client/main.c
>
> Look for ESCAPE_CHARACTER.
>
> -- Keir
>
>
> On 18/9/06 15:33, "nicko.koinkoin@free.fr" <nicko.koinkoin@free.fr> wrote:
>
> >
> >
> > Hi everybody !
> >
> > I am using xen-2.0.7, and wondered where, in the source code, is located
> > the lines that fetch the key sequence "Ctrl ]" that escape from the
> connected
> > Xen virtual console.
> > Indeed I want to add another key sequence. I spent a long time to search
> where
> > it is located in the code, without success. So if someone know where it is,
> I
> > will appreciate a lot :).
> >
> > I searched in most of files of Xend, because I think that keyboard
> interrupts
> > are always forwarded by xen to dom0, even if the active console is owned by
> a
> > domU. Then I think that the "real" keyboard driver forwarded the scan code
> or
> > ASCII code to Xend, which sends them to the active console. And maybe
> before
> > sending the ASCII codes it checks if the key sequence is "Ctrl ]" and
> switch
> > console. Am I right ?
> >
> > So where are these lines that check the key sequence and switch console ?
> >
> > Thanks.
> >
> > --
> > Nicolas CLERMONT
> >
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.xensource.com
> > http://lists.xensource.com/xen-devel
>
>
>



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Re: Handling Key Sequence [ In reply to ]
On 18/9/06 16:00, "nicko.koinkoin@free.fr" <nicko.koinkoin@free.fr> wrote:

> First thanks for your quick answer. Unfortunately, I think we don't talk about
> the same version of xen. Indeed, I do not have tools/console/, and a
> grep -r "ESCAPE_CHARACTER" xen-2.0/ doesn't find anything.
>
> So if anyone else has another advice...

tools/python/xen/util/console_client.py

Look for the lines:
if ord(data[0]) == ord(']')-64:
break

-- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Re: Handling Key Sequence [ In reply to ]
Thanks a lot ! Exactly what I was searching for ;).

Thanks Keir.

Selon Keir Fraser <Keir.Fraser@cl.cam.ac.uk>:

> On 18/9/06 16:00, "nicko.koinkoin@free.fr" <nicko.koinkoin@free.fr> wrote:
>
> > First thanks for your quick answer. Unfortunately, I think we don't talk
> about
> > the same version of xen. Indeed, I do not have tools/console/, and a
> > grep -r "ESCAPE_CHARACTER" xen-2.0/ doesn't find anything.
> >
> > So if anyone else has another advice...
>
> tools/python/xen/util/console_client.py
>
> Look for the lines:
> if ord(data[0]) == ord(']')-64:
> break
>
> -- Keir
>
>
>



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel