Deactivate Caps Lock in 14.04
I really don't need Caps Lock (who does?) and would rather have it as a Shift key as I sometimes hit it by mistake especially on the small netbook keyboard.
Since I don't read while I type this might mean I have to retype half a page. I only find solutions for Ubuntu 12.04 but they don't work for 14.04 (Somehow the "typing" dialog looks totally different, not as user friendly).
I've tried anyway and clicked on + to make a custom shortcut. It asked me for a name (I put Name: Caps Lock
) and for a command (command: disable, and I also tried command: Shift
), but that did nothing. It shows on right side under custom shortcut, but I still have Caps Lock.
I am new at Linux so please, if you have an answer don't just say: Use mxpt.de or so, but please tell me how to get to the dialog box or to a command prompt and what I need to do. (Somebody had a solution with Gnome Tweak or so, but I cannot find that program in Ubuntu 14.04).
Opening a terminal and typing in:
xmodmap -e "keycode 66 = Shift_L NoSymbol Shift_L"
followed by enter/return should remap the Caps Lock button the Left Shift.
However, this will need to be executed on each boot. You can do the following to automatically run this every time the system boots.
Search "Startup Applications" in the dash and open it.
Click add. For the name put "Caps Lock to Shift" and under "command" put
xmodmap -e "keycode 66 = Shift_L NoSymbol Shift_L"
.Press save and restart. Enjoy!
If you would rather disable Caps Lock, you can execute the following (in terminal):
setxkbmap -option caps:none
Once again, this will reset once you restart, so add a startup entry (like above) to execute this on boot.
You can remap Caps Lock is by using Gnome Tweak Tool.
You can install it via the Ubuntu Software Center if you wish or by the command line; it does not come installed on Ubuntu 14.04 by default.
-
Open a terminal by holding CTRL, ALT and T at once or by search it in the dash.
-
Type in
sudo apt-get install gnome-tweak-tool
. This tellsapt-get
to installgnome-tweak-tool
. You need to havesudo
as one needs to have root permissions to install software. -
Open Tweak Tool
-
Select "Typing" from the left bar.
-
Select "Caps Lock act as shift" where it says "Caps Lock key behaviour".
Update for version 3.32.0-1
The option is now under:
Keyboard & Mouse > Additional Layout Options > Caps Lock behaviour
To permantly disable CAPS-lock:
xkbset nullify lock
To re-enable it
xkbset nullify -lock.
To just toogle CAPS-lock:
sudo apt-get install xdotool
xdotool key Caps_Lock
Newer method
More modern distros (ubuntu 20.04) now come installed with gsettings
instead of dconf
:
gsettings set org.gnome.desktop.input-sources xkb-options "['caps:none']"
Older way
As for ubuntu 17.04 you can set a dconf setting:
dconf write /org/gnome/desktop/input-sources/xkb-options "['caps:none']"
No need to re-login.