qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5] Emulate dip switch language layout settings on SUN keyboa


From: Daniel P . Berrangé
Subject: Re: [PATCH v5] Emulate dip switch language layout settings on SUN keyboard
Date: Tue, 28 Mar 2023 18:59:26 +0100
User-agent: Mutt/2.2.9 (2022-11-12)

On Tue, Mar 28, 2023 at 07:19:58PM +0200, Henrik Carlqvist wrote:
> Thanks for your feedback!
> 
> On Tue, 28 Mar 2023 15:01:55 +0100
> Daniel P. Berrangé <berrange@redhat.com> wrote:
> 
> > This is another reason why use of the '-k' switch is a bad idea. Its
> > range of permissible values / vocabulary does not match the range of
> > values / vocabulary needed for this hardware device.
> > 
> > In https://docs.oracle.com/cd/E19683-01/806-6642/new-43/index.html
> > the keyboard layouts have distinct names
> > 
> > "Norway4" vs "Norway5" and "US4" vs  "US5" vs "US_UNIX5"
> 
> Those distinct names are names of files in the OS filesystem. This is a link
> to a description of a patch which gives those keyboard layouts support for
> the euro sign:
> 
> http://download.nust.na/pub3/solaris/patches/106839.readme
> 
> > I'd suggest a property to the escc device should take the names
> > given by that reference page above. eg
> > 
> >   -global escc.sunkbd_layout=Norway4
> 
> Would you mind if such an assignment could also be given in multiple ways,
> that is:
> 
> -global escc.sunkbd_layout=33
> -global escc.sunkbd_layout=0x21
> -global escc.sunkbd_layout=US5
> -global escc.sunkbd_layout=en_us
> 
> would all result in the same dip switch setting 0x21?

I'm generally not in favour of creating many different ways to set
the same thing, especially not multiple string based names, but if
a single vocabulary for strings is insufficient, then having support
for numbers feels reasonable.

> The nice thing with being able to assign keyboard layouts with a string like
> "en_us" is that it does not require the user to read reference documentation
> from Oracle to see which odd named layouts to choose from.
> 
> The nice thing to also being able to give numerical values like 33 or 0x21 is
> that some possible dip switch settings (like 0x20) are not mentioned in the
> Oracle reference documentation, but of course they would be possible to set
> with physical dip switches even though they might not be supported by the OS.

If you care about documentation then I think there ought to be docs
added in QEMU for it, as out of the 33 currrent keymap names supported
by QEMU, only 28 seem to be supported by this device.


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




reply via email to

[Prev in Thread] Current Thread [Next in Thread]