How can I toggle caps lock when the Caps Lock key is remapped?
-
I have a Das Keyboard plugged into a ThinkPad running Linux. For some reason, sometimes Ubuntu requires me to re-run xmodmap when I unlock my screen, which swaps my Caps Lock key with Control, as I desire. This happens so often that I usually leave a terminal window open where xmodmap is the last command that I ran, so I can hit ↑ and then Enter to re-run the command and fix my keyboard. Unfortunately, sometimes I forget to do this right away, and I don’t notice until I use the Caps Lock key and discover that it has forgotten its mapping to the Control key. Today was one such day. Unfortunately, I forgot to hit the Caps Lock key again to disable it before running xmodmap (which as described, I do without typing any characters, which would have alerted me to caps lock being on). Now caps lock is enabled and I have no key I can hit to disable it because Caps Lock is already mapped to Control. I tried logging out and back in right away, but apparently that is not “long enough” for Ubuntu to forget my key mapping. (Also, it was hard to log back in because I had to remember to hold the Shift key down while typing my password.) Is there anything I can run from the command line to undo this easily rather than creating a new .xmodmap file that undoes the mappings added by my current one?
-
Answer:
You can run the "setleds -caps" command from within a console. To get to a console, press Ctrl+Alt+F1, and press Ctrl+Alt+F7 to get back to where you were. http://ubuntuforums.org/showthread.php?p=9027534
bolinfest at Super User Visit the source
Related Q & A:
- How can I implement an atomic incr and decr on top of an eventually consistent key-value store?Best solution by Stack Overflow
- How can I fix my delete key in VIM over ssh?Best solution by Stack Overflow
- How can I use a HDMI when my TV/Monitor doesn't have internal speakers?Best solution by Yahoo! Answers
- How can I fix my tv when it won't turn on?Best solution by answers.com
- How can I lower my ping when I play games online on PC?Best solution by tomshardware.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.