Easy way to permanently remap two keyboard keys

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
franksr
Level 1
Level 1
Posts: 2
Joined: Thu May 16, 2019 2:52 pm

Easy way to permanently remap two keyboard keys

Post by franksr » Thu May 16, 2019 3:19 pm

Hi. I’m new to the forum and new to Linux Mint. I’m hoping someone can help me with a simple solution on how to permanently remap the Right Shift key to the Up Arrow key and the Up Arrow key to the Right Shift key. Lenovo in their infinite wisdom totally messed up the keyboard design by placing the Right Shift key to the right of the Up Arrow key on my Yoga 910 making usage of the Right Shift key counterintuitive. This wasn’t a problem under Windows 10 because I physically swapped the key caps to where they should have been in the first place. I then used a keyboard GUI remapping application to remap the keys. This worked fine until I decided to install Linux Mint. The problem is all my research on how to remap the keys under Linux is way, repeat way, above my head. I can’t find an application with a GUI to allow me to accomplish this. Can someone please provide me with SIMPLE instructions on how to permanently reverse the two keys mappings? Alternatively, is there a way to force Linux to access the Windows mappings which are on the same drive? Thanks in advance for a solution.

User avatar
administrollaattori
Level 15
Level 15
Posts: 5877
Joined: Tue Sep 03, 2013 4:51 am
Location: Finland
Contact:

Re: Easy way to permanently remap two keyboard keys

Post by administrollaattori » Fri May 17, 2019 1:12 am

Keyboard > Layouts > Options
[SOLVED] How to mapping any key to another any key? ->
viewtopic.php?t=282482#p1559702

magnus7
Level 3
Level 3
Posts: 167
Joined: Sat Jan 30, 2016 8:46 pm

Re: Easy way to permanently remap two keyboard keys

Post by magnus7 » Fri May 17, 2019 8:50 am

To swap Up and Right Shift run this command in terminal and restart the computer:

Code: Select all

sudo sed -i \
-e '29s|.*|key<UP>{[Shift_R]};|' \
-e '83s|.*|key<RTSH>{[Up]};|' \
/usr/share/X11/xkb/symbols/pc \
&& sudo dpkg-reconfigure xkb-data

franksr
Level 1
Level 1
Posts: 2
Joined: Thu May 16, 2019 2:52 pm

Re: Easy way to permanently remap two keyboard keys

Post by franksr » Fri May 17, 2019 6:32 pm

magnus7, Thank you very much for your help! I wasn’t sure of the spacing in the commands but it worked first time. I had spent hours scouring the Internet, to no avail. Thanks again!

Post Reply

Return to “Newbie Questions”