If you have some keys not working on your keyboard, normally you would buy a new one, which may may cost between 50 or 100 dollars, but there's a very simple solution that you can do to use your keyboard again without replacing it and it's an entirely cost-free solution!
In my example, I have a laptop with all the QWERTYUIOP row that wasn't working, requiring Tun (the owner of the laptop) to use a virtual keyboard every time those keys were needed. A really painful and slow solution!
The solution was simple: Using the central row as the replacement of the first (not-working) one by pressing a modifier key. This key was chosen to be ; which is easily accessible from all positions.
In short, if she presses A, the key A is printed, but if she presses ";" and then "A", the key "Q" is printed, perfect!
So first, edit your ~/.Xmodmap
And then paste a similar code as this:
Note: You need to use your own keys configuration, so modify this to your needs!
! redefine the central line for use as the the broken ones using the new modifier key keysym a = a A q Q keysym s = s S w W keysym d = d D e E keysym f = f F r R keysym g = g G t T keysym h = h H y Y keysym j = j J u U keysym k = k K i I keysym l = l L o O ! since P doesn't works, let's use the zero for it, which is the upper-upper alternative keysym 0 = 0 parenright p P ! since we already used the semicolon key as a modifier key, we need a new semicolon key, so we will use the minus key for it keysym minus = minus underscore semicolon colon ! This is the most important key, the modifier that makes working all the other ones (originally semicolon, changed to be a modifier, you can change it if you want) keysym semicolon = Mode_switch Mode_switch Mode_switch Mode_switch Mode_switch Mode_switch
- Run the "xev" tool from a terminal to know the default key names when you press them
- Run this command to test your settings:
setxkbmap us ; xmodmap ~/.Xmodmap
E16 probably won't load this file by itself, in which case you can simply add it to the autostart applications with this simple command:
echo " xmodmap ~/.Xmodmap" >> ~/.e16/startup-applications.list