Jürgen Keil
2008-Mar-20 18:06 UTC
b85: hvm keymap broken when using the sdl gui and non en-us keyboard layout
I''m running current opensolaris bits (~snv_86, with xvm 3.1.2) + xvm packages compiled from b85 xvm sources. In dom0, the Xorg server is used, and a german layout usb keyboard is used. Before I upgraded to b85 xvm, the keyboard layout was ok in hvm domUs (when using the sdl gui). That is, before an OS is loaded (e.g. inside Solaris'' GRUB) I had to use "en-us" keyboard layout - e.g. ''y'' and ''z'' keys swapped. And when an OS is running (e.g. inside Solaris or WinXP) the german keyboard layout was OK. But with xvm b85 the keyboard layout in sdl seems to be completely broken; both before and after the OS is loaded. For example I''ve been unable to type the ":" key in Solaris'' GRUB / Solaris kmdb. I think the root cause is this change, which seems to hardcode "en-us" keyboard layout for qemu-dm. The original xen code seems to get the layout from .py config files; why was that changed? (When I revert that change, hvm keyboard layout is OK, I get pre-b85 behavior) ===================================================== % more xen.hg/.hg/patches/keymap-workaround Temporary fix. I think we shold probably be defaulting to en-us anyway, but do we need SMF property for this? Shouldn''t it be domain-specific? diff --git a/tools/python/xen/xend/XendOptions.py b/tools/python/xen/xend/XendOptions.py --- a/tools/python/xen/xend/XendOptions.py +++ b/tools/python/xen/xend/XendOptions.py @@ -279,7 +279,8 @@ class XendOptions: self.vncpasswd_default) def get_keymap(self): - return self.get_config_value(''keymap'', None) + return ''en-us'' +# return self.get_config_value(''keymap'', None) class XendOptionsFile(XendOptions): This message posted from opensolaris.org
Russ Blaine
2008-Mar-21 23:55 UTC
Re: b85: hvm keymap broken when using the sdl gui and non en-us keyboard layout
Hey Jürgen, I added that a while ago to get HVM working. Looks like it''s no longer needed. I''ll file a bug and get it removed...thanks for the heads-up. - R Jürgen Keil wrote:> I''m running current opensolaris bits (~snv_86, with xvm 3.1.2) + xvm packages compiled > from b85 xvm sources. In dom0, the Xorg server is used, and a german layout usb > keyboard is used. Before I upgraded to b85 xvm, the keyboard layout was ok in hvm > domUs (when using the sdl gui). That is, before an OS is loaded (e.g. inside > Solaris'' GRUB) I had to use "en-us" keyboard layout - e.g. ''y'' and ''z'' keys swapped. > And when an OS is running (e.g. inside Solaris or WinXP) the german keyboard layout > was OK. > > But with xvm b85 the keyboard layout in sdl seems to be completely broken; > both before and after the OS is loaded. For example I''ve been unable to > type the ":" key in Solaris'' GRUB / Solaris kmdb. > > > I think the root cause is this change, which seems to hardcode "en-us" > keyboard layout for qemu-dm. The original xen code seems to get the > layout from .py config files; why was that changed? > > (When I revert that change, hvm keyboard layout is OK, I get pre-b85 behavior) > > =====================================================> > % more xen.hg/.hg/patches/keymap-workaround > Temporary fix. I think we shold probably be defaulting to en-us anyway, > but do we need SMF property for this? Shouldn''t it be domain-specific? > > diff --git a/tools/python/xen/xend/XendOptions.py b/tools/python/xen/xend/XendOptions.py > --- a/tools/python/xen/xend/XendOptions.py > +++ b/tools/python/xen/xend/XendOptions.py > @@ -279,7 +279,8 @@ class XendOptions: > self.vncpasswd_default) > > def get_keymap(self): > - return self.get_config_value(''keymap'', None) > + return ''en-us'' > +# return self.get_config_value(''keymap'', None) > > class XendOptionsFile(XendOptions): > > > This message posted from opensolaris.org > _______________________________________________ > xen-discuss mailing list > xen-discuss@opensolaris.org-- ----------------------------------------------------- Russ Blaine | Solaris Kernel | russell.blaine@sun.com
John Levon
2008-Mar-23 18:20 UTC
Re: b85: hvm keymap broken when using the sdl gui and non en-us keyboard layout
On Fri, Mar 21, 2008 at 04:55:02PM -0700, Russ Blaine wrote:> I added that a while ago to get HVM working. Looks like it''s no longer needed. > I''ll file a bug and get it removed...thanks for the heads-up.I think removing this patch will mean everyone has to specify -k en-us to virt-install - far from ideal. return self.get_config_value(''keymap'', ''en-us'') seems like the right fix, no? regards> > - R > > J?rgen Keil wrote: > > I''m running current opensolaris bits (~snv_86, with xvm 3.1.2) + xvm packages compiled > > from b85 xvm sources. In dom0, the Xorg server is used, and a german layout usb > > keyboard is used. Before I upgraded to b85 xvm, the keyboard layout was ok in hvm > > domUs (when using the sdl gui). That is, before an OS is loaded (e.g. inside > > Solaris'' GRUB) I had to use "en-us" keyboard layout - e.g. ''y'' and ''z'' keys swapped. > > And when an OS is running (e.g. inside Solaris or WinXP) the german keyboard layout > > was OK. > > > > But with xvm b85 the keyboard layout in sdl seems to be completely broken; > > both before and after the OS is loaded. For example I''ve been unable to > > type the ":" key in Solaris'' GRUB / Solaris kmdb. > > > > > > I think the root cause is this change, which seems to hardcode "en-us" > > keyboard layout for qemu-dm. The original xen code seems to get the > > layout from .py config files; why was that changed? > > > > (When I revert that change, hvm keyboard layout is OK, I get pre-b85 behavior) > > > > =====================================================> > > > % more xen.hg/.hg/patches/keymap-workaround > > Temporary fix. I think we shold probably be defaulting to en-us anyway, > > but do we need SMF property for this? Shouldn''t it be domain-specific? > > > > diff --git a/tools/python/xen/xend/XendOptions.py b/tools/python/xen/xend/XendOptions.py > > --- a/tools/python/xen/xend/XendOptions.py > > +++ b/tools/python/xen/xend/XendOptions.py > > @@ -279,7 +279,8 @@ class XendOptions: > > self.vncpasswd_default) > > > > def get_keymap(self): > > - return self.get_config_value(''keymap'', None) > > + return ''en-us'' > > +# return self.get_config_value(''keymap'', None) > > > > class XendOptionsFile(XendOptions): > > > > > > This message posted from opensolaris.org > > _______________________________________________ > > xen-discuss mailing list > > xen-discuss@opensolaris.org > > -- > > ----------------------------------------------------- > Russ Blaine | Solaris Kernel | russell.blaine@sun.com > _______________________________________________ > xen-discuss mailing list > xen-discuss@opensolaris.org >
Jürgen Keil
2008-Mar-25 11:20 UTC
Re: b85: hvm keymap broken when using the sdl gui and non en-us keyboard
John wrote:> On Fri, Mar 21, 2008 at 04:55:02PM -0700, Russ Blaine wrote: > > > I added that a while ago to get HVM working. Looks like it''s no longer needed. > > I''ll file a bug and get it removed...thanks for the heads-up. > > I think removing this patch will mean everyone has to specify -k en-us > to virt-install - far from ideal. > > return self.get_config_value(''keymap'', ''en-us'') > > seems like the right fix, no?Hmm, I think for a vnc display it doesn''t make a difference, xen.hg/tools/ioemu/vl.c function vnc_display_init() does this, when no keyboard layout is specified: if (!keyboard_layout) keyboard_layout = "en-us"; vs->kbd_layout = init_keyboard_layout(keyboard_layout); But sdl is different; xen.hg/tools/ioemu/sdl.c, function sdl_display_init() #if defined(__APPLE__) /* always use generic keymaps */ if (!keyboard_layout) keyboard_layout = "en-us"; #endif if(keyboard_layout) { kbd_layout = init_keyboard_layout(keyboard_layout); if (!kbd_layout) exit(1); } sdl also seems to default to "en-us" keymap, but only when qemu-dm is compiled on APPLE (= MacOS X?) ?? I guess the HVM keymap problems start when sdl displays to a non-Xorg (non-PC?) X11 server (SPARC Xsun?, MacOS X?, X terminals?). This message posted from opensolaris.org