Remapping keys in Linux

linux-category-inverted

My ZenBook 3 has one minor issue I really take to heart, the menu key (on the right hand side of the space bar) is a secondary action to the right control key.

That means to get the menu up from the keyboard requires a Fn-Right-Control sequence which is annoying to say the least.

In windows I had remapped it with a third party app as I don’t really use the right control while typing and so in Linux I had to find a way to do it as well.

Fortunately, Linux comes with xmodmap which can do this.  You can go to this article to get more details about how to do it, but the short answer is:

xmodmap -e "keycode 105 = Menu"

Then save it to your local xmodmap file:

xmodmap -pke > ~/.Xmodmap

Then add it to your .xinitrc startup script:

if [ -f $HOME/.Xmodmap ]; then
 /usr/bin/xmodmap $HOME/.Xmodmap
fi

And your done.

Greg

Greg

Greg is the head cat at JumbleCat, with over 20 years of experience in the computer field, he has done everything from programming to hardware solutions. You can contact Greg via the contact form on the main menu above.

More Posts - Website

Greg

Greg

Greg is the head cat at JumbleCat, with over 20 years of experience in the computer field, he has done everything from programming to hardware solutions. You can contact Greg via the contact form on the main menu above.

Leave a Reply