After I uploaded the last version, I realised that I had forgotten something in the event reporting: raw key numbers. These give the position of the key regardless of what that key is mapped to. For example, key 15 might be a "y" in an English layout or a "z" in a German one. As this can be useful in some applications I have added it to the library.
Keys are numbered left to right, top to bottom, with the top left key being zero. As usual, the downloads can be found at https://dboucher.org.uk/keyboard/.