Low level remapping of keys for qemu evdev

Kernels & Hardware, configuring network, installing services

Low level remapping of keys for qemu evdev

Postby paulclou » 2019-01-06 04:14

Hi all,

My goal is to perform PCI-passthrough using libvirt and QEMU. A function called evdev from QEMU is to pass keyboard and mouse with virtio driver between host (Debian) and guest (Windows 10) by pressing left-control (LCTL) and right-control (RCTL). The problem is I am using HHKB Pro2, which does not have RCTL, and QEMU evdev hardcoded LCTL+RCTL as the hotkey.

I attempted to remap the keys in Linux using
  • Xmodmap
  • Directly editing /usr/share/X11/xkb/keycodes/evdev
which although showed Control_R in xev, did not work for evdev toggle. I installed SharpKeys to remap the key in Windows which did not work as well.

I suspect to achieve minimal latency they pass the devices directly (through PCI?), perhaps bypassing the mappings. I confirmed that the setup is correct because regular keyboard with a RCTL does work for host and guest swapping, thus the issue is whether I can remap the keys at a low level at all.

Would anyone know if low level of remapping would be possible through software?

Thank you.

*A developer attempted to introduce a patch to change hotkeys for evdev toggle, but was not integrated.
paulclou
 
Posts: 15
Joined: 2011-10-17 08:08

Re: Low level remapping of keys for qemu evdev

Postby Head_on_a_Stick » 2019-01-06 10:34

I can't help directly (sorry) but:
paulclou wrote:A developer attempted to introduce a patch to change hotkeys for evdev toggle, but was not integrated

You can apply the patch yourself by adding a deb-src line to /etc/apt/sources.list then use `apt-get source` to download the source package and then use quilt:

https://raphaelhertzog.com/2012/08/08/h ... -packages/
User avatar
Head_on_a_Stick
 
Posts: 10321
Joined: 2014-06-01 17:46
Location: /dev/chair


Return to System configuration

Who is online

Users browsing this forum: fender0107401 and 14 guests

fashionable