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
tools/console/client/main.c
Look for ESCAPE_CHARACTER.
-- Keir
Quoted 29 lines · On 18/9/06 15:33, "[email protected]" <[email protected]> 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
[email protected]
http://lists.xensource.com/xen-devel
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.
Quoted 50 lines
tools/console/client/main.cLook for
ESCAPE_CHARACTER.-- Keir
Quoted 6 lines · On 18/9/06 15:33, "[email protected]" <[email protected]> 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
Quoted 2 lines
Xen virtual console.
Indeed I want to add another key sequence. I spent a long time to searchwhere
Quoted 1 line
it is located in the code, without success. So if someone know where it is,
I
Quoted 3 lines
will appreciate a lot :).
I searched in most of files of Xend, because I think that keyboard
interrupts
Quoted 1 line
are always forwarded by xen to dom0, even if the active console is owned by
a
Quoted 1 line
domU. Then I think that the "real" keyboard driver forwarded the scan code
or
Quoted 1 line
ASCII code to Xend, which sends them to the active console. And maybe
before
Quoted 1 line
sending the ASCII codes it checks if the key sequence is "Ctrl ]" and
switch
Quoted 13 lines
console. Am I right ?
So where are these lines that check the key sequence and switch console ?
Thanks.
--
Nicolas CLERMONT_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 5 lines · On 18/9/06 16:00, "[email protected]" <[email protected]> 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
Thanks a lot ! Exactly what I was searching for ;).
Thanks Keir.
Selon Keir Fraser <[email protected]>:
Quoted 19 lines · On 18/9/06 16:00, "[email protected]" <[email protected]> wrote:
Quoted 2 lines
First thanks for your quick answer. Unfortunately, I think we don't talk
about
Quoted 4 lines
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.pyLook for the lines:
if ord(data[0]) == ord(']')-64: break-- Keir