I recently acquired a Lenovo 510-15 and using Right shift proves to be very bothersome, because of the terrible layout:
So I tried to remap Right shift and Up keys, by running these commands:
xmodmap -e "keycode 62 = Up" # => Up
xmodmap -e "keycode 111 = Shift_R" # => Shift
xmodmap -e "add shift = Shift_R" # Make the new Shift key actually shift
xset r 62 # repeat Up key
xset -r 111 # don't repeat new Shift key
They somewhat work, but with those following issues:
-
Shift key works now as both Up and Shift simultaneously.
-
Shift key won't repeat, meaning that, if I hold it down, it will only go one line up, unlike a normal up key, which continues to jump.
If anyone could help me sort these issues out or suggest an alternative way of fixing this problem it would be greatly appreciated.
Best Answer
I forgot to add this line:
So it should look like this:
I've got this solution from this Ask Ubuntu answer. I saved these lines as a .sh file and added it to my startup applications using KDE startup manager so I don't have to run these commands in the terminal after each restart. There is also an alternative, more universal way to make those changes permanent, described in the topic I've linked above.