Comment 14 for bug 1787267

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I tested a matrix of:
- ubuntu/xubuntu/lubuntu
- vga qxl / vga virtio
- keymap de / en-us / none
- input host keymapping de / en-us
- xtightvncviewer / tigervnc-viewer / spicy

Silly helper to spawn all of these:
#!/bin/bash
runguest () {
    local prefix=$1
    local kbd=$2
    local idx=$3
    local lidx=$(printf "%02d" $3)
    local vga=$4

    local cmd="qemu-system-x86_64 -spice port=50${lidx},password=pw -vga ${vga} -vnc :${idx}"

    if [ "${prefix}" == "u" ]; then
        realprefix=""
    else
        realprefix="${prefix}"
    fi
    cmd="${cmd} -cdrom ${realprefix}ubuntu-18.04-desktop-amd64.iso"

    if [ -n "${kbd}" ]; then
        cmd="${cmd} -k ${kbd}"
    else
        kbd="none"
    fi

    cmd="${cmd} -name '${lidx}-${prefix}-${kbd}-${vga}'"

    ${cmd} &
}

runguest "u" "de" 1 "qxl"
runguest "l" "de" 2 "qxl"
runguest "x" "de" 3 "qxl"
runguest "u" "en-us" 4 "qxl"
runguest "l" "en-us" 5 "qxl"
runguest "x" "en-us" 6 "qxl"
runguest "u" "" 7 "qxl"
runguest "l" "" 8 "qxl"
runguest "x" "" 9 "qxl"
runguest "u" "de" 11 "virtio"
runguest "l" "de" 12 "virtio"
runguest "x" "de" 13 "virtio"
runguest "u" "en-us" 14 "virtio"
runguest "l" "en-us" 15 "virtio"
runguest "x" "en-us" 16 "virtio"
runguest "u" "" 17 "virtio"
runguest "l" "" 18 "virtio"
runguest "x" "" 19 "virtio"

Results are a quadruple of DEl-DEk/DEl-USk/USl-DEk/USl-USk in this order
With the first element defining the clients current keyboard alyout (a.k.a. what is on my system)
DEl = German layout, USl = EN-US Layout
The second is the actual key pressedwith
DEk = AltGr+<, USk Shitf+# (on my German keyboard equaling the keycode for a | on en-us).
X means the key gave some odd control char or something like that.

After a while it became clear that the UI had no effect, so I skipped further U/X/Lubuntu differences

                    tight tiger spicy
1 U-DE-QXL <|<> <|<> <|<|
2 L-DE-QXL <|<> <|<> <|<|
3 X-DE-QXL <|<> <|<> <|<|
4 U-US-QXL <"<> <"<> <|<|
7 U-No-QXL <"<> <"<> <|<|
11 U-DE-VIRTIO <|<> <|<> <|<|
14 U-US-VIRTIO <"<> <"<> <|<|
17 U-No-VIRTIO <"<> <"<> <|<|

Insights:
- Spice ignores every config and behaves like a us querty keaboard.
- The VNC implementations has no influence
- The vga mode has no influence
- The Ubuntu Desktop type has no influence
- If US or no keycode is set then the none of the keys in vnc mode maps to a "|", instead it is a "
- With a en-us keyboard layout on the Client I can't reach a "|"

With the insights above the interesting tests after update from the PPA will be:

                    tight tiger spicy
1 U-DE-QXL <|<> <|<> <|<|
4 U-US-QXL \"\| \"\| <|<|
7 U-No-QXL \"\| \"\| <|<|

That would confirm that now qemu VNC with en-us keymaps (or not set) would have a keycode on US keyboard layouts to reach the | character.
Interestingly the very same change made it unreachable for non-US layout (client) to reach the | if no keymap or an en.us keymap is set.

But that is probably ok as -k is exactly meant to override the keymaps (default en-us) for those cases (VNC + client non en-us).

Hrm, that seems sort of ok (better now than before testing for sure) - I'm still feeling unsure how much potential regression that might be for others.