Remapping your keyboard under Ubuntu

I recently gave a try to Ubuntu Budgie Desktop Environment, and so far it’s great. I only had one Major issue: Super touch.

I’m a Mac user, and the position of the Super touch reminds me a lot of my Apple Touch (or cmd) but it does not have the same behaviour. AT ALL. So when i used Ubuntu and unity, a simple xmodmap on a file with these instructions did the trick:

remove mod4 = Super_L Super_R
add control = Super_L Super_R

Then I executed my .xmodmap file on startup (with xmodmap .xmodmap) and, i had what i wanted. But after the install of Budgie Desktop Environment, it didn’t suited me because the Super Touch was triggered and two behaviours came from the touch :(. Fortunately I came up with another solution to remap Super Key. I got my keycode from:

xmodmap -pke | grep -i super

xmodmap -pke | grep -i control

On my machine it ended with the following solution:

xmodmap -e “keycode 133 = Control_L NoSymbol Control_L"

But i still had troubles with my Super touch.

So I found this solution and now it works great :)

To apply it, edit the xbd file (/usr/share/X11/xkb/symbols/pc). For this you will have to find the key you want to swap (Super_L in my case) and change the function attributed to it:

key <Yourkey> { [FunctionYouWant] };

Now after a reboot your keys are mapped correctly and you are ready to go :)

Cheers

--

--

Web developer, tech enthusiast, music lover…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store