Hi Guys, genuine noob here. I need some help with my first 'puter project -
I have a PI2 running Raspbian, a vintage ZX Spectrum computer & hacked USB keyboard chip.
I've used the USB keyboard chip to interface the keys from the Spectrum into my PI2.
Unfortunately, I'm having problems re-mapping the keys using XMODMAP...
Now this where it gets weird, let me explain -
Firstly, I've managed to successfully map the basic numbers & letters, so that the Spectrum keys trigger the appropriate KeySymbol.
However, I'm having serious problems with the modifier keys...
SHIFT_L is mapping perfectly, and will trigger CAPITALIZED letters.
BUT... I can't seem to get accurate results from my re-mapped ALTGR button -
It works fine for SOME keys, but for others it will behave like SHIFT_L or not work at all
So as you can see below, I've (attempted) to re-map the Spectrum's SYMBOL SHIFT key to 'MOD5' (altgr), so that the 'number' keys will trigger !,@,#,$,%,&,',(,) and _.
so for 12345767890, I SHOULD be getting !@#$&%'()_
But - instead I'm getting 12345&78)_
It's working fine for keys '6', '9' and '0' but NOT for the other keys....
GGGrrrrrr... I don't understand what's happening here
Anyway, this is my xmodmap code. Please help me!
# first, sort out CAPS SHIFT and SYMBOL SHIFT as a shift and AltGr key..
xmodmap -e "keycode 85 = Shift_L"
xmodmap -e "keycode 97 = Control_R"
xset -r 85 # prevent new shift from autorepeating
xset -r 97 # prevent new AlrGr from autorepeating
xmodmap -e "add shift = Shift_L"
xmodmap -e "remove control = Control_R"
xmodmap -e "add mod5 = Control_R"
# one key maps to 'Caps Lock', need to remove this function to get it working
xmodmap -e "remove lock = Caps_Lock"
# Right, standard keys now... top row first, left to right...
xmodmap -e "keycode 89 = 1 1 exclam exclam exclam"
xmodmap -e "keycode 88 = 2 2 at at at"
xmodmap -e "keycode 112 = 3 3 numbersign numbersign numbersign"
xmodmap -e "keycode 34 = 4 4 dollar dollar dollar"
xmodmap -e "keycode 33 = 5 5 percent percent percent"
xmodmap -e "keycode 60 = 6 6 ampersand ampersand ampersand"
xmodmap -e "keycode 173 = 7 7 apostrophe apostrophe apostrophe"
xmodmap -e "keycode 114 = 8 8 parenleft parenleft parenleft parenleft"
xmodmap -e "keycode 106 = 9 9 parenright parenright parenright"
xmodmap -e "keycode 86 = 0 BackSpace underscore underscore underscore"
I should also mention that I've asked this same question on the PI forum, and no one's replied -
Hopefully I can get some help here, as this project is currently useless without being able to re-map the keys.