[virt-tools-list] [libosinfo 1/2] install-config: Document expected kbd layout format

Christophe Fergeau cfergeau at redhat.com
Fri Nov 30 15:03:17 UTC 2012


On Fri, Nov 30, 2012 at 04:30:16PM +0200, Zeeshan Ali (Khattak) wrote:
> On Fri, Nov 30, 2012 at 11:37 AM, Christophe Fergeau
> <cfergeau at redhat.com> wrote:
> >This API seems to be very fedora-specific,
> 
> The format is more like Linux specific but yeah, currently we only
> need this for Fedora and 'keyboard' command is required in the
> kickstart.

Ubuntu (and Debian as well I guess) uses a similar but different format,
'layout_variant' as opposed to the 'layout (variant)' that you suggest
using in the public API. XkbLayout seems to be quite close to a country
code, so is easy to get from a 'gettext' format.

> 
> > the way it works on win7
> > is described there:
> > http://technet.microsoft.com/fr-fr/library/cc749191%28v=ws.10%29.aspx
> > though I did not quite get the format of keyboard layouts
> >
> >  void osinfo_install_config_set_l10n_keyboard(OsinfoInstallConfig *config,
> >                                               const gchar *locale,
> >                                               const gchar *keyboard_layout);
> > will probably be more flexible. 'locale' would be in the same 'gettext'
> > format as in other places. Not sure at all what the format of
> > keyboard_layout should be, just that it can be NULL to use the default
> > keyboard layout (which is what we'll want most of the time).
> 
> IMO for now we shouldn't set the keyboard layout for windows since its
> autodeteced (right?) from the language params that we do set. We also
> have the API for apps to know if a param is used by a script or not
> and if it is used, if its mandatory.
> 
> If we decide to do so in future, we could either figure a way to
> translate from X layouts to locale names or add new param/API to
> set/get locale and declare in windows scripts that they make use of
> this param.

After looking at how Ubuntu does things, having 2 arguments seems it will
make things less convoluted... And I'd prefer if we spent a bit of time
trying to get the API right now.
This API is also missing a way to handle multiple layouts, which at least
Windows and Fedora support, I don't know if this is on purpose?

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20121130/d42561c2/attachment.sig>


More information about the virt-tools-list mailing list