A friend has a hardware problem with their laptop . a stuck key.
This handy piece of nix remaps it to reserved. This might be useful to anyone who trying to get broken keyboards going.
{ pkgs, config, lib, ... }:
{
# Disable my right arrow key, since it is broken.
systemd.services.keycode-swap = {
enable = true;
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
};
wantedBy = [ "multi-user.target" ];
script = ''
${pkgs.kbd}/bin/setkeycodes 106 0
'';
};
}
The Magic number 106 and 0 , can be referenced here…
have funnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn