Deactivate Caps Lock in 14.04

37,690

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.

  1. Search "Startup Applications" in the dash and open it.

  2. Click add. For the name put "Caps Lock to Shift" and under "command" put xmodmap -e "keycode 66 = Shift_L NoSymbol Shift_L".

  3. 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.

  1. Open a terminal by holding CTRL, ALT and T at once or by search it in the dash.

  2. Type in sudo apt-get install gnome-tweak-tool. This tells apt-get to install gnome-tweak-tool. You need to have sudo as one needs to have root permissions to install software.

  3. Open Tweak Tool

  4. Select "Typing" from the left bar.

  5. Select "Caps Lock act as shift" where it says "Caps Lock key behaviour".

Screenshot depicting step 5 above.

Update for version 3.32.0-1

The option is now under:

Keyboard & Mouse > Additional Layout Options > Caps Lock behaviour

enter image description here
enter image description here

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
  1. Open Gnome Tweaks
  2. Select Keyboard & Mouse from the left panel
  3. Click on Additional Layout Options from the right side
  4. Click the arrow next to Caps Lock key behavior. Set Caps Lock key to what you want.
Share:
37,690

Related videos on Youtube

Karsten Decker
Author by

Karsten Decker

Updated on September 18, 2022

Comments

  • Karsten Decker
    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
      Elder Geek over 9 years
      Welcome 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
    Karsten Decker over 9 years
    Thank 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
    Bentley Carr over 9 years
    I think it was additional shift key. Anyway, glad it helped!
  • Karsten Decker
    Karsten Decker over 9 years
    With this I got where I wanted to be. Than you. Great help including explaining how to get there.
  • Bentley Carr
    Bentley Carr over 9 years
    No problem, @Karsten Decker!
  • Fred Hamilton
    Fred Hamilton about 8 years
    Bums 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
    RexFuzzle almost 8 years
    I used the second one as the question is TL;DR and comes up first when you google how to disable caps lock.
  • ADW
    ADW about 7 years
    Just 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
    Admin over 6 years
    works in 17.10!
  • nicorellius
    nicorellius almost 6 years
    This 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
    Chris almost 6 years
    @nicorellius: This was the case on 15.04 when writing of the answer was done.
  • nicorellius
    nicorellius almost 6 years
    My bad, I was responding thinking it was for 16.04. Thank you.
  • Chris
    Chris almost 6 years
    @nicorellius:Ok, that's fine.
  • CIRCLE
    CIRCLE over 5 years
    Thank you! Just released me from a world of trouble
  • PeterM
    PeterM over 4 years
    This should be default lol!
  • AlainD
    AlainD over 4 years
    Also works on 18.04. Install Dconf-Editor with apt-get install dconf-editor -y.
  • Martin
    Martin almost 4 years
    Also works on 20.4
  • CyanCoding
    CyanCoding almost 3 years
    In 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.