Keyboard input not working when the "-k en-us" argument is specified.

Bug #1267520 reported by Mofi Taiwo
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
QEMU
Expired
Undecided
Unassigned

Bug Description

This bug occurs on qemu compiled with i386_softmmu and x86-64_softmmu on linux kernel 3.5.0 (64-bit). (Haven't confirmed this for other targets).
Whenever I run qemu (both i386 and x86_64) to use the en-us language (even though it is the default), I get "Warning: no scancode found for keysym X" (X is an integer).
In the disk image I need qemu to run, I had a shell set up. The shell doesn't register keyboard input when the '-k en-us' command line argument is set to run qemu. I did not have this problem with earlier versions of qemu.

Additional information:
Setting keymaps directory on command line -L doesn't resolve this.
Bug occurs with on both curses and sdl VGA output.
I am running qemu on Ubuntu 12.04 and I have not been able see if the bug is distribution-specific. However, I am also experiencing the bug on Kali-Linux; another debian based distribution.
It turns out that all languages reproduce the bug, not just 'en-us'.

Update: I have narrowed the bug to be attributable to versions later than qemu-1.1.2.

Here's a listing of key being mapped:

Setting keysym exclam (33) to 258
Setting keysym at (64) to 259
Setting keysym numbersign (35) to 260
Setting keysym dollar (36) to 261
Setting keysym percent (37) to 262
Setting keysym asciicircum (94) to 263
Setting keysym ampersand (38) to 264
Setting keysym asterisk (42) to 265
Setting keysym parenleft (40) to 266
Setting keysym parenright (41) to 267
Setting keysym minus (45) to 12
Setting keysym underscore (95) to 268
Setting keysym equal (61) to 13
Setting keysym plus (43) to 269
Setting keysym bracketleft (91) to 26
Setting keysym braceleft (123) to 282
Setting keysym bracketright (93) to 27
Setting keysym braceright (125) to 283
Setting keysym semicolon (59) to 39
Setting keysym colon (58) to 295
Setting keysym apostrophe (39) to 40
Setting keysym quotedbl (34) to 296
Setting keysym grave (96) to 41
Setting keysym asciitilde (126) to 297
Setting keysym backslash (92) to 43
Setting keysym bar (124) to 299
Setting keysym comma (44) to 51
Setting keysym less (60) to 307
Setting keysym period (46) to 52
Setting keysym greater (62) to 308
Setting keysym slash (47) to 53
Setting keysym question (63) to 309

As one can see, the pc-bios/keymaps/common, contaning the QWWERTY keys, is not processed in parse_init_keyboard at ui/keymaps.c even though the XKB map (keymaps/en-us) includes the file.

Tags: qemu qemu-1.7
Mofi Taiwo (lilmurfer)
description: updated
description: updated
description: updated
description: updated
Mofi Taiwo (lilmurfer)
description: updated
Mofi Taiwo (lilmurfer)
description: updated
Mofi Taiwo (lilmurfer)
description: updated
Mofi Taiwo (lilmurfer)
description: updated
description: updated
Mofi Taiwo (lilmurfer)
description: updated
Revision history for this message
Rich Fletcher (richfletcher) wrote :

I think I stumbled on this bug. I was using packer to generate qemu-based virtual machines, and identical configurations would fail (complaining about invalid keymaps when keystrokes were sent) depending on where the current directory was. It doesn't work if qemu is run from a directory containing a directory named "common".

Guessing this is related to qemu_find_file, maybe https://github.com/qemu/qemu/commit/31783203c3b74c11015b20194d57dada559940cf#diff-48a342a3d278d5bdcc69db8f9758dcd6 .

Revision history for this message
Andrew Oates (andrewoates) wrote :

Yes, that's exactly the issue. If you run qemu in a directory with a file or subdir called 'common' then the keymap won't load.

Revision history for this message
Rowan Potgieter (rowan-potgieter) wrote :

I can confirm that this issue is still present with:
QEMU emulator version 2.5.0 (Debian 1:2.5+dfsg-5ubuntu10.6)
Kernel: 4.4.0-53-generic

I am using Packer and the QEMU builder and only the \ key was working in a Windows Guest. I had created folder called "common" to host all the Windows Powershell scripts and this is causing the issue.

Revision history for this message
skovalev (valor) wrote :

I confirm this too: Qemu 2.6.1.

I have tried to install Fedora with kickstart file through Packer with `"boot_command": [ "<tab>text ks=http://{{.HTTPIP}}:{{.HTTPPort}}/ks.cfg<enter>"]`. But no symbol from `["<tab>", " ", "[:alpha:]"]` were printed. Only `["=", ":", "/", "."]` could be seen if I manually press "<tab>".

Revision history for this message
Thomas Huth (th-huth) wrote :

I think this is likely fixed with QEMU 4.0 by this commit here:

https://git.qemu.org/?p=qemu.git;a=commitdiff;h=26b1cbf8b65b3b55c3f

Could you please try again with QEMU 4.0-rc4 (or the final 4.0 release next week)?

Changed in qemu:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for QEMU because there has been no activity for 60 days.]

Changed in qemu:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.