A few months ago I tried to reassign some keys on my keyboard and accidentally broke my '8' key. Unfortunately, I have no idea how I did it because I tried out a few different methods and didn't notice that I had broken it until a few days later.
To fix it, I used xev to find out the keycode, 17, then I used xmodmap to assign the correct value:
xmodmap -e "keycode 17=8".
However, the key still doesn't work. When I check it out in xev it shows the right keycode and the right assigned value but the computer doesn't seem to be recognising when the key is pressed. I know the key works because if I hold it down it starts printing 8s after a few seconds.
Update: I just noticed that after messing around with xmodmaps the shift+8 and alt+8 functionality is now also broken so I cannot get a left parenthesis or the left square bracket.
Resetting the keyboard to the default should work. I tried doing it with
dpkg-reconfigure keyboard-configuration but I am using a lenovo t460p and they don't seem to have correct keyboard model.
I have been looking around the forums but I can't seem to find a solution. The all seem to be for adding shortcuts or switching key values. Any help would be much appreciated.