Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have disabled caps lock in Ubuntu via the System Settings -> Keyboard panel (see How to programmatically swap the caps lock and esc keys? on how to find this option), however when I switch to a text-mode tty terminals (through Ctrl + Alt + F1) caps lock is no longer disabled.

I use these text-based terminals a fair amount - is there a way to completely disable Caps Lock, even on these terminals?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

I had success using the instructions posted on this blog in a virtual console:

echo -e "$(dumpkeys | grep ^keymaps)\nkeycode 58 = Escape" | sudo loadkeys

I'm not sure how to apply this automatically after every reboot, though.


While researching your question, I also ran across this alternative solution:

Disable Caps Lock

share|improve this answer
    
I honestly have no idea what that command did, but it worked! At some point I'll have to work my way through that blog post and understand it, but for now thanks! –  Justin May 20 '11 at 17:35
    
After every reboot? Use @reboot for the numbers in /etc/crontab and put the command. –  JMCF125 Oct 14 '13 at 21:28

Adding the following line to .profile or .bash_profile should disable caps lock:

xmodmap -e "remove lock = Caps_Lock"
share|improve this answer
    
How do you use xmodmap when you're not running an X server? –  ændrük May 20 '11 at 18:08
    
I would assume Kragen is running an X server, since they mentioned GNOME's System Settings panel. –  Wesley Rice May 21 '11 at 0:46
    
In a typical Ubuntu installation, X does not run in the tty1 virtual console. –  ændrük May 21 '11 at 4:06
    
I tried this [in X, ubuntu 11.04] and it's not working. did they change it? –  Matt Dec 19 '11 at 1:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.