Daniel P. Berrange
2006-Nov-28 22:50 UTC
[Xen-devel] [PATCH] Enable uppercase letters to be entered in QEMU monitor terminal
Changeset 10742:3e07ec30c445 made it possible to switch to the QEMU
monitor terminal when using the VNC display protocol. Unfortunately
the VNC key handling is rather crazy, so even if you have the shift
key pressed, a VNC client will send a lowercase letter, expecting the
server to interpret the state of the shift key as desired.
Normally in HVM guests, the guest OS does this interpretation just fine,
but if you switch to the monitor terminal (Ctrl+Alt+2) then the guest OS
is not involved. The end result: it is impossible to type any uppercase
letters in the monitor - which makes it hard to type in file paths for
example.
In the spirit of the original patch in changeset 10742, the attached patch
is the simplest solution to make shift keys work - it tracks the shift key
and caps lock key state. If both are active, or both inactive, then no
transform is made; If either one, or the other (but not both) are active,
then the letters a-z are transformed to A-Z, and vica-verca.
A real long term solution would be to somehow get the monitor to use
the proper keymap tables like the SDL display does, but that''s
something
which should really be done upstream rather than as a Xen patch since it
would be a rather large amount of work.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Regards,
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Keir Fraser
2006-Nov-29 11:45 UTC
Re: [Xen-devel] [PATCH] Enable uppercase letters to be entered in QEMU monitor terminal
On 28/11/06 22:50, "Daniel P. Berrange" <berrange@redhat.com> wrote:> In the spirit of the original patch in changeset 10742, the attached patch > is the simplest solution to make shift keys work - it tracks the shift key > and caps lock key state. If both are active, or both inactive, then no > transform is made; If either one, or the other (but not both) are active, > then the letters a-z are transformed to A-Z, and vica-verca.Doesn''t this eat the shift/caps key events even when not in qemu monitor mode? What if the guest has shortcut key combos involving those keys, for example? -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Daniel P. Berrange
2006-Nov-29 12:04 UTC
Re: [Xen-devel] [PATCH] Enable uppercase letters to be entered in QEMU monitor terminal
On Wed, Nov 29, 2006 at 11:45:50AM +0000, Keir Fraser wrote:> On 28/11/06 22:50, "Daniel P. Berrange" <berrange@redhat.com> wrote: > > > In the spirit of the original patch in changeset 10742, the attached patch > > is the simplest solution to make shift keys work - it tracks the shift key > > and caps lock key state. If both are active, or both inactive, then no > > transform is made; If either one, or the other (but not both) are active, > > then the letters a-z are transformed to A-Z, and vica-verca. > > Doesn''t this eat the shift/caps key events even when not in qemu monitor > mode? What if the guest has shortcut key combos involving those keys, for > example?Opps, yes, the shift/caps bits need to be protected by a conditional on !is_graphics_console(). Will redo the patch to fix that. Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=| _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2006-Nov-29 12:19 UTC
Re: [Xen-devel] [PATCH] Enable uppercase letters to be entered in QEMU monitor terminal
On 29/11/06 12:04, "Daniel P. Berrange" <berrange@redhat.com> wrote:>> Doesn''t this eat the shift/caps key events even when not in qemu monitor >> mode? What if the guest has shortcut key combos involving those keys, for >> example? > > Opps, yes, the shift/caps bits need to be protected by a conditional on > !is_graphics_console(). Will redo the patch to fix that.Tracking shift/caps at all times makes sense, but the cooking-and-eating should happen conditionally. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Daniel P. Berrange
2006-Nov-29 15:48 UTC
Re: [Xen-devel] [PATCH] Enable uppercase letters to be entered in QEMU monitor terminal
On Wed, Nov 29, 2006 at 11:45:50AM +0000, Keir Fraser wrote:> On 28/11/06 22:50, "Daniel P. Berrange" <berrange@redhat.com> wrote: > > > In the spirit of the original patch in changeset 10742, the attached patch > > is the simplest solution to make shift keys work - it tracks the shift key > > and caps lock key state. If both are active, or both inactive, then no > > transform is made; If either one, or the other (but not both) are active, > > then the letters a-z are transformed to A-Z, and vica-verca. > > Doesn''t this eat the shift/caps key events even when not in qemu monitor > mode? What if the guest has shortcut key combos involving those keys, for > example?Re-checking the patch I believe its already doing the correct thing. The do_key_event method is broken into 2 halfs. In the first half, the keysyms are sent to either the guest OS, or the monitor. In the second half the shift/caps/ctrl/alt state is being tracked. So the code I added for tracking shift/caps does not interfere with the earlier code which actually sends the key press to the guest OS. Regards, Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=| _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2006-Nov-29 16:09 UTC
Re: [Xen-devel] [PATCH] Enable uppercase letters to be entered in QEMU monitor terminal
On 29/11/06 15:48, "Daniel P. Berrange" <berrange@redhat.com> wrote:>> Doesn''t this eat the shift/caps key events even when not in qemu monitor >> mode? What if the guest has shortcut key combos involving those keys, for >> example? > > Re-checking the patch I believe its already doing the correct thing. > > The do_key_event method is broken into 2 halfs. In the first half, the > keysyms are sent to either the guest OS, or the monitor. In the second > half the shift/caps/ctrl/alt state is being tracked. So the code I added > for tracking shift/caps does not interfere with the earlier code which > actually sends the key press to the guest OS.Okay, I''ll read the code more carefully. :-) -- keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Kasai Takanori
2006-Dec-20 11:15 UTC
Re: [Xen-devel] [PATCH] Enable uppercase letters to be entered in QEMU monitor terminal
Hi Keir and Daniel, I also found the same problem and tested this patch. I confirmed it was solved by this patch. I hope for this patch to be applied. Thanks -- Takanori Kasai ----- Original Message ----- From: "Keir Fraser" <keir@xensource.com> To: "Daniel P. Berrange" <berrange@redhat.com>; "Keir Fraser" <keir@xensource.com> Cc: <xen-devel@lists.xensource.com> Sent: Thursday, November 30, 2006 1:09 AM Subject: Re: [Xen-devel] [PATCH] Enable uppercase letters to be entered inQEMU monitor terminal> > > > On 29/11/06 15:48, "Daniel P. Berrange" <berrange@redhat.com> wrote: > >>> Doesn''t this eat the shift/caps key events even when not in qemu monitor >>> mode? What if the guest has shortcut key combos involving those keys, for >>> example? >> >> Re-checking the patch I believe its already doing the correct thing. >> >> The do_key_event method is broken into 2 halfs. In the first half, the >> keysyms are sent to either the guest OS, or the monitor. In the second >> half the shift/caps/ctrl/alt state is being tracked. So the code I added >> for tracking shift/caps does not interfere with the earlier code which >> actually sends the key press to the guest OS. > > Okay, I''ll read the code more carefully. :-) > > -- keir > > > _______________________________________________ > 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
Keir Fraser
2006-Dec-20 11:19 UTC
Re: [Xen-devel] [PATCH] Enable uppercase letters to be entered in QEMU monitor terminal
It''s been checked in since November. -- Keir On 20/12/06 11:15, "Kasai Takanori" <kasai.takanori@jp.fujitsu.com> wrote:> Hi Keir and Daniel, > > I also found the same problem and tested this patch. > I confirmed it was solved by this patch. > I hope for this patch to be applied. > > Thanks > > -- > Takanori Kasai > > > ----- Original Message ----- > From: "Keir Fraser" <keir@xensource.com> > To: "Daniel P. Berrange" <berrange@redhat.com>; "Keir Fraser" > <keir@xensource.com> > Cc: <xen-devel@lists.xensource.com> > Sent: Thursday, November 30, 2006 1:09 AM > Subject: Re: [Xen-devel] [PATCH] Enable uppercase letters to be entered inQEMU > monitor terminal > > >> >> >> >> On 29/11/06 15:48, "Daniel P. Berrange" <berrange@redhat.com> wrote: >> >>>> Doesn''t this eat the shift/caps key events even when not in qemu monitor >>>> mode? What if the guest has shortcut key combos involving those keys, for >>>> example? >>> >>> Re-checking the patch I believe its already doing the correct thing. >>> >>> The do_key_event method is broken into 2 halfs. In the first half, the >>> keysyms are sent to either the guest OS, or the monitor. In the second >>> half the shift/caps/ctrl/alt state is being tracked. So the code I added >>> for tracking shift/caps does not interfere with the earlier code which >>> actually sends the key press to the guest OS. >> >> Okay, I''ll read the code more carefully. :-) >> >> -- keir >> >> >> _______________________________________________ >> 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_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Kasai Takanori
2006-Dec-21 01:31 UTC
Re: [Xen-devel] [PATCH] Enable uppercase letters to be entered in QEMU monitor terminal
Hi Keir,
Sorry, I confirmed it was applied.
·xen-unstable.hg : cs 12653
[QEMU] Do shift-key processing in QEMU monitor terminal when connected via
VNC.
Thanks
--
Takanori Kasai
----- Original Message -----
From: "Keir Fraser" <keir@xensource.com>
To: "Kasai Takanori" <kasai.takanori@jp.fujitsu.com>; "Keir
Fraser"
<keir@xensource.com>; "Daniel P. Berrange"
<berrange@redhat.com>
Cc: <xen-devel@lists.xensource.com>
Sent: Wednesday, December 20, 2006 8:19 PM
Subject: Re: [Xen-devel] [PATCH] Enable uppercase letters to be entered in QEMU
monitor terminal
> It''s been checked in since November.
>
> -- Keir
>
> On 20/12/06 11:15, "Kasai Takanori"
<kasai.takanori@jp.fujitsu.com> wrote:
>
>> Hi Keir and Daniel,
>>
>> I also found the same problem and tested this patch.
>> I confirmed it was solved by this patch.
>> I hope for this patch to be applied.
>>
>> Thanks
>>
>> --
>> Takanori Kasai
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel