Deactivate Caps Lock in 14.04
Solution 1
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.
Solution 2
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
Solution 3
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
Solution 4
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.
Solution 5
for Ubuntu 17.10
sudo apt install -y gnome-tweak-tool
- Open Gnome Tweaks
- Select Keyboard & Mouse from the left panel
- Click on Additional Layout Options from the right side
- Click the arrow next to Caps Lock key behavior. Set Caps Lock key to what you want.
Related videos on Youtube
Karsten Decker
Updated on September 18, 2022Comments
-
Karsten Decker over 1 year
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).
-
Elder Geek over 9 yearsWelcome to askubuntu! Have you tried the software center? You can install it from there and then follow the instructions here:askubuntu.com/questions/453793/…
-
-
Karsten Decker over 9 yearsThank you both of you. I used method of Yharooer, and was able to disable Caps Lock which is good enough. (I could not read the end of the options like in your screen shot, so it was a bit guessing what additional... it would be).
-
Bentley Carr over 9 yearsI think it was additional shift key. Anyway, glad it helped!
-
Karsten Decker over 9 yearsWith this I got where I wanted to be. Than you. Great help including explaining how to get there.
-
Bentley Carr over 9 yearsNo problem, @Karsten Decker!
-
Fred Hamilton about 8 yearsBums me out when when the first response/answer is the best answer but it doesn't get accepted and a copy of the first answer gets more votes.
-
RexFuzzle almost 8 yearsI used the second one as the question is TL;DR and comes up first when you google how to disable caps lock.
-
ADW about 7 yearsJust to say the command below dconf write /org/gnome/desktop/input-sources/xkb-options "['caps:none']" also works for ubuntu 16.04. Thanks to the poster.
-
Admin over 6 yearsworks in 17.10!
-
nicorellius almost 6 yearsThis answer might not technically be correct (or maybe have an alternate answer). On my system, Ubuntu 16.04, with Genome Tweak Tool, I had to choose the option Caps Lock is disabled rather than Disabled. The latter refers to disabling the Caps Lock key behavior in the tweak tool (I think), as mine was set to this option and the Caps Lock key still functioned as default.
-
Chris almost 6 years@nicorellius: This was the case on 15.04 when writing of the answer was done.
-
nicorellius almost 6 yearsMy bad, I was responding thinking it was for 16.04. Thank you.
-
Chris almost 6 years@nicorellius:Ok, that's fine.
-
CIRCLE over 5 yearsThank you! Just released me from a world of trouble
-
PeterM over 4 yearsThis should be default lol!
-
AlainD over 4 yearsAlso works on 18.04. Install
Dconf-Editor
withapt-get install dconf-editor -y
. -
Martin almost 4 yearsAlso works on 20.4
-
CyanCoding almost 3 yearsIn Fedora 34 this was the only solution that worked. Thanks! Curiously, after changing the Caps Lock key in the terminal, Tweaks knew that it had been remapped to Shift even though the key didn't act like it. When I changed it again in Tweaks it did fix it.