Remapping the CoPilot Key on IdeaPad with Keyd and CW
The CoPilot Key
The Lenovo IdeaPad 5 has a CoPilot where it should have
a Control Key.
The key simulates a combination of keys,
so normal ways of mapping the key
(udev/hwdb.d on Debian) do not work.
keyd can hook the key,
though,
and present another virtual keyboard device.
USB Adapter for CW Keys
There are inexpensive USB adapters
that allow plugging a CW key or Iambic paddle
into the computer
for use with vBand
or other games.
The adapter presents as a keyboard,
and the paddles show up as additional Left and Right Ctrl keys.
If you are running keyd on the machine,
its default behavior of mapping Right Ctrl to be Left Ctrl
(which I guess lots of people find useful)
will interfere
and cause both sides of the paddle to trigger the same dit or dah.
Fortunately, we can undo this broken behavior to get the key working again.
The Complete Configuration
Create /etc/keyd/default.conf:
[ids] * [main] # copilot key leftshift+leftmeta+f23 = rightcontrol # keep right ctrl as it is. keyd by default remaps it to left ctrl for some reason rightcontrol = rightcontrol
Restart keyd: systemctl restart keyd
Testing
After the mappings have been applied,
you can be observe it with evtest.
You’ll also see the key working in vBand.
I wouldn’t have needed keyd if it wasn’t for
needing to remap the useless CoPilot key.


