I have recently been working on the hardware side of a project which now works fine. However I now have a software problem to overcome regarding keyboard mapping.
I have connected a Sinclair Spectrum 48k keyboard via a USB keyboard controller to my Raspi. All the keys work but return completely the wrong letters/numbers to the screen. This is of course exactly what I expected to happen but I now need to remap the keyboard back to something sane. By following the man pages I have worked out how to change the remapping from (say) UK to German layouts but I can’t find anywhere how I remap on a more fundamental basis, i.e. mapping each individual keypress.
At the moment if I press “a” on the keyboard it will return “Y” to the screen and if I press the shift key it will then return “d”. (BTW – the shift lives on the “h” key at the moment).
The spectrum keyboard works on a 10 x 4 matrix consisting of A – Z, 0 – 9, 2 x shift keys, Return and Space keys. This means realistically I will need one shift key for lower case / capitals and will need to use the second to shift letters / numbers to symbols (i.e. +, =, /, \, ect). This of course means that most keys will have 3 functions (Upper case / Lower case / Symbol).
There is of course the problem that I cannot really work on the booted image for obvious reasons so I will need to work by editing the files (or whatever I need to do) on a separate machine. I need this remapping to work at both the command line and in the x GUI levels.
So my question is how do I do this type of remapping?. I only have a very limited understanding of Linux but I am more than happy to put in the work researching and learning if somebody can point me in the direction of some documentation or better still some sort of tutorial on this subject.
Thanks in anticipation.
Moderators - If you feel this post is in the wrong section please move it. I wasn't sure if this was a beginners / advanced OS question or a case project question.... or something else.