Fixing Right Shift acting as Left Shift on Linux

I won't beat around the bush; for ages, I had been plagued with an issue where my Right Shift key had been acting like Left Shift, and the same was happening with my Right Control and Left Control keys. After using evtest, it showed that the keystrokes my system was receiving were both showing as Left Shift.

After more time than I care to admit, I randomly tried assigning rightshift = "rightshift"; within my keyd config, and turns out, that's all I needed to do! After a quick systemctl reload keyd it worked exactly how it should! Turns out, the same happens with your right control key too.

NixOS Example:

{
  services.keyd = {
    enable = true;

    keyboards.default = {
      ids = [ "*" ];

      settings.main = {
        rightshift = "rightshift";
        rightcontrol = "rightcontrol";
      };
    };
  };
}

Hopefully this helps someone, don't ask me why keyd decides to merge Left Shift and Right Shift, but this fix helped me a ton!