Keyboard remaping: udev's extraHwdbFile not taken into account?

I’m not sure why, but I can’t manage to make udev load the hwdb file (used to remap keys, here I try to remap the “menu” key of a QWERTY keyboard to the “<>” key that we have on french keyboards). For that, I added in my configuration:

  services.udev = {
    extraHwdb = ''
      keyboard:usb:v*p*
       KEYBOARD_KEY_70065=102nd
    '';
  };

However it does not work. If I look at the source of the module, I can see that it tries to create a file /etc/udev/hwdb.d/99-local.hwdb however I don’t have this file on my system after loading the above config:

$  ls /etc/udev
hwdb.bin  rules.d
$ ls /run/current-system/sw/etc/
bash_completion.d  dbus-1  gtk-2.0  gtk-3.0  xdg

Do you know what could be wrong here? Why isn’t the file written?

1 Like

Same issue here. @tobiasBora did you manage to solve it eventually?

No, you might want to dook at Udev keyboard remapping: ExtraHwdb does not work anymore? · Issue #182966 · NixOS/nixpkgs · GitHub but I ended up using bépo that does not need any remap, so I have not tried further.