As for the key presses being sent incorrectly. I’ve done a bit of digging and found that the Librem laptops all use a “ene KB3930QF-A1” microcontroller to handle the keyboard matrix translation. This microcontroller was also used a part of the One Laptop Per Child project, so the datasheets have been made public.
http://www.datasheet4u.com/datasheet-pdf/ENE/KB3930/pdf.php?id=723070
https://puri.sm/posts/roadmap-to-a-completely-free-bios/
I’ve also found a tool used for reading and writing to the EC firmware on kakaroto’s Github and was able to successfully dump the firmware of my controller. The instructions all run on an embedded Intel 8051, so I am working to disassemble it now, but running into issues…
As part of the OLPC project they released the firmware used for their KB3930 embedded controllers, and much information on how the keyboard matrix is handled can be found in the files “keyboard.c” and “keymapping.txt”. If Purism would release the source code for their implementation of this microcontroller then we would be able to alter, compile, and flash it back to the laptop to resolve the mapping at a hardware level.
http://dev.laptop.org/git/users/rsmith/ec-1.75
Hopefully the source code for the Embedded Controller used on the Librem laptops will be released, in which case it would be trivial to make this correction.
I hope my post was helpful.