#StackBounty: #20.04 #keyboard #systemd #udev #microsoft-keyboard Can't remap keys on a Microsoft Keyboard with HWDB

Bounty: 50

I’m trying to remap LCtrl and CapsLock on my Microsoft Wired Keyboard 600 with HWDB but for whatever reason the system does not see the changes that I make.

This is how my hwdb rule looks like:

evdev:input:b*v045Ep07F8*
 KEYBOARD_KEY_3a=leftctrl
 KEYBOARD_KEY_1d=capslock

The vendor and the model codes come from lsusb and were reconfirmed in /sys/devices/pci0000:00/*

After copying the config file to /etc/udev/hwdb.d, running systemd-hwdb update and issuing udevadm trigger no changes in the keyboard config are present.

I’ve also tried:

  • Rebooting — didn’t help.
  • Specifying the bus explicitly as 0003 — didn’t help.
  • Confirming with evtest that the key codes I’m using are correct for my keyboard — yep, those are the correct keycodes.
  • Confirming the applied rules are listed in sudo udevadm info /sys/class/input/eventX — yes, the new rules are listed, which should mean they were applied successfully? Yet the keys behave the same way they did before.
E: KEYBOARD_KEY_1d=capslock
E: KEYBOARD_KEY_3a=leftctrl
E: ID_USB_DRIVER=usbhid

When I use evdev:atkbd:dmi:* as the device identifier instead the change is correctly applied to my laptop keyboard so I know the rule and the process I’m using to remap the keys should be correct, it’s got to be an issue with the wrong identifier (though I’ve quintuple checked it).

Any help will be appreciated.


Get this bounty!!!

#StackBounty: #20.04 #keyboard #systemd #udev #microsoft-keyboard Can't remap keys on a Microsoft Keyboard with HWDB

Bounty: 50

I’m trying to remap LCtrl and CapsLock on my Microsoft Wired Keyboard 600 with HWDB but for whatever reason the system does not see the changes that I make.

This is how my hwdb rule looks like:

evdev:input:b*v045Ep07F8*
 KEYBOARD_KEY_3a=leftctrl
 KEYBOARD_KEY_1d=capslock

The vendor and the model codes come from lsusb and were reconfirmed in /sys/devices/pci0000:00/*

After copying the config file to /etc/udev/hwdb.d, running systemd-hwdb update and issuing udevadm trigger no changes in the keyboard config are present.

I’ve also tried:

  • Rebooting — didn’t help.
  • Specifying the bus explicitly as 0003 — didn’t help.
  • Confirming with evtest that the key codes I’m using are correct for my keyboard — yep, those are the correct keycodes.
  • Confirming the applied rules are listed in sudo udevadm info /sys/class/input/eventX — yes, the new rules are listed, which should mean they were applied successfully? Yet the keys behave the same way they did before.
E: KEYBOARD_KEY_1d=capslock
E: KEYBOARD_KEY_3a=leftctrl
E: ID_USB_DRIVER=usbhid

When I use evdev:atkbd:dmi:* as the device identifier instead the change is correctly applied to my laptop keyboard so I know the rule and the process I’m using to remap the keys should be correct, it’s got to be an issue with the wrong identifier (though I’ve quintuple checked it).

Any help will be appreciated.


Get this bounty!!!

#StackBounty: #20.04 #keyboard #systemd #udev #microsoft-keyboard Can't remap keys on a Microsoft Keyboard with HWDB

Bounty: 50

I’m trying to remap LCtrl and CapsLock on my Microsoft Wired Keyboard 600 with HWDB but for whatever reason the system does not see the changes that I make.

This is how my hwdb rule looks like:

evdev:input:b*v045Ep07F8*
 KEYBOARD_KEY_3a=leftctrl
 KEYBOARD_KEY_1d=capslock

The vendor and the model codes come from lsusb and were reconfirmed in /sys/devices/pci0000:00/*

After copying the config file to /etc/udev/hwdb.d, running systemd-hwdb update and issuing udevadm trigger no changes in the keyboard config are present.

I’ve also tried:

  • Rebooting — didn’t help.
  • Specifying the bus explicitly as 0003 — didn’t help.
  • Confirming with evtest that the key codes I’m using are correct for my keyboard — yep, those are the correct keycodes.
  • Confirming the applied rules are listed in sudo udevadm info /sys/class/input/eventX — yes, the new rules are listed, which should mean they were applied successfully? Yet the keys behave the same way they did before.
E: KEYBOARD_KEY_1d=capslock
E: KEYBOARD_KEY_3a=leftctrl
E: ID_USB_DRIVER=usbhid

When I use evdev:atkbd:dmi:* as the device identifier instead the change is correctly applied to my laptop keyboard so I know the rule and the process I’m using to remap the keys should be correct, it’s got to be an issue with the wrong identifier (though I’ve quintuple checked it).

Any help will be appreciated.


Get this bounty!!!

#StackBounty: #20.04 #keyboard #systemd #udev #microsoft-keyboard Can't remap keys on a Microsoft Keyboard with HWDB

Bounty: 50

I’m trying to remap LCtrl and CapsLock on my Microsoft Wired Keyboard 600 with HWDB but for whatever reason the system does not see the changes that I make.

This is how my hwdb rule looks like:

evdev:input:b*v045Ep07F8*
 KEYBOARD_KEY_3a=leftctrl
 KEYBOARD_KEY_1d=capslock

The vendor and the model codes come from lsusb and were reconfirmed in /sys/devices/pci0000:00/*

After copying the config file to /etc/udev/hwdb.d, running systemd-hwdb update and issuing udevadm trigger no changes in the keyboard config are present.

I’ve also tried:

  • Rebooting — didn’t help.
  • Specifying the bus explicitly as 0003 — didn’t help.
  • Confirming with evtest that the key codes I’m using are correct for my keyboard — yep, those are the correct keycodes.
  • Confirming the applied rules are listed in sudo udevadm info /sys/class/input/eventX — yes, the new rules are listed, which should mean they were applied successfully? Yet the keys behave the same way they did before.
E: KEYBOARD_KEY_1d=capslock
E: KEYBOARD_KEY_3a=leftctrl
E: ID_USB_DRIVER=usbhid

When I use evdev:atkbd:dmi:* as the device identifier instead the change is correctly applied to my laptop keyboard so I know the rule and the process I’m using to remap the keys should be correct, it’s got to be an issue with the wrong identifier (though I’ve quintuple checked it).

Any help will be appreciated.


Get this bounty!!!

#StackBounty: #windows #keyboard #keyboard-shortcuts Windows shortcuts inserting last stroked key

Bounty: 50

When I use any of the shortcuts in my system, it first insert my last stroked key belongs to that shortcut. I also tried 4 diffirent keyboard models in my laptop, but its still same.

For example if I copy "Hello World!" text with CTRL + C and then paste it with CTRL + V, it writes V key before the copied text, pasted text becoming "vHello World!".

Another example is, if I select "Hello World!" text with CTRL + A key and then stroke SPACE (or any key) in my keyboard, it writes the A key.

This is so annoying… Here is my hardware and software specifications,

  • System Model: HP ZBook Studio G5
  • Operating System: Windows 10 Pro 64-bit (10.0, Build 18363)
  • BIOS: Q71 Ver. 01.11.03


Get this bounty!!!

#StackBounty: #keyboard #raspberrypi #mint #anydesk AnyDesk 6.0.1, keyboard Alt Gr combinations does not work from linux to linux

Bounty: 50

From any Linux Distro to any Linux Distro, with AnyDesk 6.0.1 and older versions, Alt Gr combinations does not work, for example is not possible to write: "€@#[]{}".
In my specific case I use Linux Mint 20 to Raspberry Pi OS "raspios_full_armhf-2020-08-24". I have the same keyboard configuration in host and in the guest both.
Alt Gr work from Windows to Linux, from Linux to Windows and from Windows to Windows.
I have already submitted a ticket to AnyDesk support.
I haven’t found anyone on the internet who has the same problem as me, but my co-workers have the same problem as me.
How can I solve the problem?


Get this bounty!!!

#StackBounty: #keyboard #xmodmap xmodmap resets when keyboard mode changes

Bounty: 50

I have a Keychron K2 mechanical keyboard and the keys on the righthand side of the keyboard look like this:

enter image description here

I would like to swap them to a more standard layout, so that, from top to bottom, I would have Light Toggle, Home, Page Up, Page Down, and End.

I used xev to retrieve the key codes and wrote a small script that uses xmodmap to swap them to my liking:

#!/bin/bash

xmodmap -e "keycode 110 = Next" && xmodmap -e "keycode 112 = Home" && xmodmap -e "keycode 117 = Prior"

This script is executed on start up and works exactly as expected.

The problem is this keyboard is both wired and Bluetooth. When I switch between wired mode to Bluetooth mode or vice-versa, the keys go back to their default position and I need to manually run my script above one more time. xev shows to me that in both cases the key codes are the same. Is there a better way of tackling this so that these keys are swapped regardless of the keyboard mode I use?


Get this bounty!!!

#StackBounty: #gnome #keyboard #xorg #gdm why am i getting ' event processing lagging behind' msg in Ubuntu 20.10

Bounty: 50

seeing my system logs, they are full of msgs like this:

/usr/libexec/gdm-x-session[2564]: (EE) event4  - SIGMACHIP USB Keyboard: client bug: event processing lagging behind by 25ms, your system is too slow
/usr/libexec/gdm-x-session[2564]: (EE) event4  - SIGMACHIP USB Keyboard: client bug: event processing lagging behind by 17ms, your system is too slow

i have a 12 core system which is essentially idle when i see this. it seems to happen since i upgraded to Ubuntu 20.10.

how can i find the root cause and how to eliminate this issue?

sys info:

model name  : AMD Ryzen 9 3900X 12-Core Processor
/sys/devices/system/cpu/cpufreq/policy10/scaling_driver:acpi-cpufreq
/sys/devices/system/cpu/cpufreq/policy0/scaling_governor:ondemand


grep . /sys/devices/system/cpu/cpuidle/*
/sys/devices/system/cpu/cpuidle/available_governors:ladder menu teo 
/sys/devices/system/cpu/cpuidle/current_driver:acpi_idle
/sys/devices/system/cpu/cpuidle/current_governor:menu
/sys/devices/system/cpu/cpuidle/current_governor_ro:menu


Get this bounty!!!

#StackBounty: #gnome #keyboard #xorg #gdm why am i getting ' event processing lagging behind' msg in Ubuntu 20.10

Bounty: 50

seeing my system logs, they are full of msgs like this:

/usr/libexec/gdm-x-session[2564]: (EE) event4  - SIGMACHIP USB Keyboard: client bug: event processing lagging behind by 25ms, your system is too slow
/usr/libexec/gdm-x-session[2564]: (EE) event4  - SIGMACHIP USB Keyboard: client bug: event processing lagging behind by 17ms, your system is too slow

i have a 12 core system which is essentially idle when i see this. it seems to happen since i upgraded to Ubuntu 20.10.

how can i find the root cause and how to eliminate this issue?

sys info:

model name  : AMD Ryzen 9 3900X 12-Core Processor
/sys/devices/system/cpu/cpufreq/policy10/scaling_driver:acpi-cpufreq
/sys/devices/system/cpu/cpufreq/policy0/scaling_governor:ondemand


grep . /sys/devices/system/cpu/cpuidle/*
/sys/devices/system/cpu/cpuidle/available_governors:ladder menu teo 
/sys/devices/system/cpu/cpuidle/current_driver:acpi_idle
/sys/devices/system/cpu/cpuidle/current_governor:menu
/sys/devices/system/cpu/cpuidle/current_governor_ro:menu


Get this bounty!!!

#StackBounty: #ubuntu #keyboard #xmodmap xmodmap lost after sleep

Bounty: 50

In Ubuntu 18.04 I use the following autostart script:

[Desktop Entry]
Type=Application
Exec=/home/user/.xinitrc
Version=1.0
X-GNOME-Autostart-enabled=true
Name=xmodmap
Comment=xmodmap script

which just xmodmap /path/.Xmodmap &.

When the system boots up, it works. When the system awakes from sleep, the remapping no longer works. How can I fix this?

EDIT: (reply to a comment)
This also does not fix the issue:

$ cat /etc/systemd/system/xmodmapbindings.service
[Unit]
Description=xmodmap bindings
Before=sleep.target
StopWhenUnneeded=yes

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStop=-/home/norake/.xinitrc

[Install]
WantedBy=sleep.target

$ cat ~/.xinitrc 
#!/bin/bash

if [ "$USER" != norake ]; then
    su norake -c 'sleep 5; /usr/bin/xmodmap /home/norake/.Xmodmap' &
    # without su, without sleep, without fork (&): doesn't work either
else
    (sleep 5; /usr/bin/xmodmap /home/norake/.Xmodmap) &
fi

sleep 30 doesn’t work either. Of course the script run manually works.


Get this bounty!!!