Ubuntu Remap keys in the keyboard

Left Shift key on my keyboard started acting up. It some times work, some times it won’t. I never use the caps lock key on my kayboard, this is just above the shift key. So i decided to use this key as left shift key.

To re-assign key, you need to edit file /usr/share/X11/xkb/symbols/pc

Lets take a copy of the file before we edit it

cp /usr/share/X11/xkb/symbols/pc ~/pc-backup

Edit

sudo gedit /usr/share/X11/xkb/symbols/pc

Find the line

     key  {	[ Caps_Lock		]	};

This is on line 22

Replace with

     key  {	[ Shift_L		]	};

Now you need to restart X-Windows by pressing ALT+F2, then type r. You can also just reboot your computer for the new keymap to work. After restart, i can use Caps lock key as my Left Shift key.

If you want to disable left shift key, you can comment the line

    key  {	[ Shift_L		]	};

by adding // at beginning of the line.

See Ubuntu

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *