From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Phillip Susi <psusi@ubuntu.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Pipe key broken on US keyboards
Date: Fri, 17 Aug 2018 16:05:13 +0100 [thread overview]
Message-ID: <20180817150513.GT11124@redhat.com> (raw)
In-Reply-To: <bf97cfed-ca7f-8670-0aad-da1b847eb609@ubuntu.com>
On Thu, Aug 16, 2018 at 01:11:05PM -0400, Phillip Susi wrote:
> Hello, I recently upgraded my Xen server from Ubuntu 16.04 to 18.04 and
> am no longer able to type a | over vnc to the xen vms. When I press \
> it works, but when I hold down shift and press \ which should generate a
> |, the vm sees the scan code for some key that the keymap thinks should
> sit between left shift and Z, but does not exist on US keyboards, and
> that scan code produces a > when combined with shift. I'm betting it
> was this commit that broke it:
>
> commit ab8f9d49d62c82a12409475547e4420a46da56ed
> Author: Daniel P. Berrange <berrange@redhat.com>
> Date: Wed Jan 17 16:41:15 2018 +0000
>
> hw: convert ps2 device to keycodemapdb
>
> Replace the qcode_to_keycode_set1, qcode_to_keycode_set2,
> and qcode_to_keycode_set3 tables with automatically
> generated tables.
>
> Any ideas?
>
> According to xev in the vm, they scan code for \ is 51, and when I hold
> down shift, it changes to scan code 94.
Reading again, this is a bit odd. On most keyboards, holding down shift
key generally would NOT change the scan code that is reported (there are a
few keys which are exceptions - sysrq/printscr). The scancode is associated
with the physical key location, and holding down shift doesn't change that.
The intepretation of the shift should (mostly) only take place when the
scancode is changed to a key symbol by the kernel/xorg.
Scancode 94 from xev, once the offset is removed, this corresponds
to scancdoe 0x56 in XT and key 86 in Linux key codes.
Scancode 51 from xev, once the offset is removed, this corresponds
to scancdoe 0x2b in XT and key 43 in Linux key codes.
On my US layout keyboard the '\' key will emit XT scancode 86 regardless
of whether the shift key is held or not
On my UK layout keyboard the '\' key will emit XT scancode 43 regardless
of whether the shift key is held or not
The QEMU guest I tested will correctly interpret this *if* I load the
correct matching keymap in the guest.
ie if using my US layout keyboard I must
loadkeys /lib/kbd/keymaps/kegacy/i386/qwerty/us.map.gz
while for my UK layout keyboard I must use
loadkeys /lib/kbd/keymaps/kegacy/i386/qwerty/uk.map.gz
NB, I'm using QEMU 2.12.0 which has the complete rewrite of the key
handling, while it looks like you have 2.11.0 from Ubuntu.
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 :|
next prev parent reply other threads:[~2018-08-17 15:05 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-16 17:11 [Qemu-devel] Pipe key broken on US keyboards Phillip Susi
2018-08-16 17:27 ` Daniel P. Berrangé
2018-08-16 19:44 ` Phillip Susi
2018-08-17 8:56 ` Daniel P. Berrangé
2018-08-17 12:44 ` Phillip Susi
2018-08-17 12:58 ` Daniel P. Berrangé
2018-08-17 13:10 ` Phillip Susi
2018-08-17 13:12 ` Daniel P. Berrangé
2018-08-17 13:23 ` Phillip Susi
2018-08-17 14:36 ` Phillip Susi
2018-08-17 14:44 ` Daniel P. Berrangé
2018-08-17 14:55 ` Phillip Susi
2018-08-17 15:06 ` Daniel P. Berrangé
2018-08-17 12:56 ` Daniel P. Berrangé
2018-08-17 15:05 ` Daniel P. Berrangé [this message]
2018-08-17 15:16 ` Phillip Susi
2018-08-17 15:51 ` Daniel P. Berrangé
2018-08-21 19:35 ` Phillip Susi
2018-08-20 8:43 ` Gerd Hoffmann
2018-08-20 14:23 ` Phillip Susi
2018-08-20 15:07 ` Christian Ehrhardt
2018-08-20 19:51 ` Phillip Susi
2018-08-20 20:04 ` Christian Ehrhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180817150513.GT11124@redhat.com \
--to=berrange@redhat.com \
--cc=psusi@ubuntu.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.