Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 752730

Summary: [RFE] Support multiple keyboards (e.g. PS/2 & USB) sanely, just like mice
Product: Red Hat Enterprise Linux 6 Reporter: juzhang <juzhang>
Component: qemu-kvmAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2CC: acathrow, armbru, bsarathy, michen, mkenneth, tburke, virt-maint
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-08 09:42:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description juzhang 2011-11-10 09:07:41 UTC
Description of problem:
Boot guest with isa keyboard and usb keyboard simultaneous,then hot unplug usb keyboard,we can not type anything in guest.the keyboard is out of work. 

Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.209.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Boot guest with usb keyboard and isa keyboard simutaneous
#..qemu-kvm -usb -device usb-kbd,id=kbd1
2.hot remove usb keyboard
#(qemu) device_del kdb1

  
Actual results:
In guest,keyboard is out of work. 

Expected results:
ISA keyboard should take over when usb keyboard is hot removed,like usb mouse.


Additional info:
I also tried boot guest with usb mouse and isa mouse simultaneous.
1.#qemu-kvm -usb -device usb-mouse,id=mouse1 
2.check mouse info
(qemu) info mice
* Mouse #1: QEMU USB Mouse(usb is using)
  Mouse #0: QEMU PS/2 Mouse
3.hot remove usb mouse
(qemu) device_del mouse1
4.check mouse info again,ps mouse take over at once.
(qemu) info mice
* Mouse #0: QEMU PS/2 Mouse

Results.
ps mouse take over at once,mouse still works in guest.

Comment 1 Markus Armbruster 2011-11-10 09:25:53 UTC
Works as designed.  Fair RFE.

When a mouse device registers, it's put into list mouse_handlers. First one is the "active" mouse.  You can activate another one with monitor command "mouse_set".  When a mouse device gets unplugged, it's removed from mouse_handlers.  If it was the active mouse, then whatever mouse is now first in the list becomes the active mouse, if any.

When a keyboard device registers, it's put into qemu_put_kbd_event, i.e. it becomes *the* keyboard.  When a keyboard device gets unplugged, it sets qemu_put_kbd_event to null.  Thus, the last keyboard to register makes all other keyboards in the system unusable forever.

There have been patches for real multiple keyboard support posted upstream.  Last iteration here:
http://lists.gnu.org/archive/html/qemu-devel/2011-05/msg00312.html