Ubuntu – Caps Lock is turned off when i change the language


Pretty self explanatory question. Does anyone know why this is happening? I am using 16.04 with English and Greek languages. When I am changing the language on the keyboard, caps lock is turned off, so I have to press it again.

Just to clarify, this is happening for years now, as of 2014!!! It hapens with all the languages, and both ways from Gr to En and vise versa. I have used every combination for keyboard input that exists and can't find the solution.

It continued even after i reinstalled 14.04, and even when i changed computers.

The formats and the changing of computers where done retaining the /home folder, so it could be something in my configs….

Best Answer

  • Having my self this problem, I decided to make a script that I can run in the background, and keep the Caps Lock status the same, between language changes. It JUST WORKS!ΑΠΛΑ ΔΟΥΛΕΥΕΙ! (The previous example was typed by keeping the caps lock on while changing between English and Greek). You can find it on github, https://github.com/mechpanos/capskeeper .

    It uses Python, wit the pyxhook module to listen to the key presses even in the background (included), and it also takes advantage of the pyautogui library to automatically press CAPS LOCK button, if needed (needs to be installed separately, with the command pip install -U pyautogui).

    Thanks to all the folks for the examples of using Python, pyxhook and pyautogui, that helped make this script! Feel free to test it and make it better, if you want to...

    You can run it on the background, using no hangup to run a program in background even if you close your terminal:

    nohup python /path/to/capskeeper_1.py &

    Do not forget to use & to put it in background.