3

As a followup to this question, my Caps Lock key is now mapped to Compose instead. However, it turns out that my 14 month old toddler still manages to turn on Caps Lock from time to time with his expert keyboard bashing (one of his hobbies).

There will probably be more cases where I could use a Caps Lock key, be it combating keyboard-bashing, or starting a career as a forum troll.

Upon declaring that I want my Num lock to always be on, I could remap that key to function as a Caps Lock.

For now I have a simple script run on xorg start:

setxkbmap -option compose:caps

And I therefore have a few questions:

  • 1a. How do I make my Num Lock key function as a caps lock?

    -or-

  • 1b. Did my son find a hotkey that I'm not aware of?

  • 2a. How do I programatically turn Num Lock on, so that I can script this?

  • 2b How ho I programatically read the Num Lock status?

For the record: Linux Mint 17, using XFCE. Using US Dvorak with Caps Lock as Compose.

Jarmund
  • 1,068
  • 1
  • 8
  • 11
  • 2
    [This](http://askubuntu.com/q/325272/178596) question over on AskUbuntu may help ([this one](http://askubuntu.com/questions/80254/how-do-i-turn-off-caps-lock-the-lock-not-the-key-by-command-lin) as well for turning off Caps Lock when it is turned on by accident. – Wilf Apr 10 '15 at 20:38
  • A bit late but for others... This article does exactly that, see the final few paragraphs: [Remapping Caps Lock in Ubuntu](https://www.bendangelo.me/linux/2015/10/15/remap-caps-lock-in-ubuntu.html) – mattst Feb 12 '18 at 16:58

0 Answers0