2

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

  • Does it still happen if you change the switch languages keyboard shortcut? What if you change it from the status bar, with the mouse? Have you checked your keyboard settings? Under "Advanced" (or "Extra" or similar, I don't have Unity) there should be various options about specific keys. Is there anything about caps lock there? – terdon Oct 12 '16 at 08:48
  • I have exactly the same issue. Yes, it doesn't depend on how I change the layout and I can't find any setting for this in the text entry settings. – MakisH Oct 12 '16 at 08:54
  • @MakisH and you're also using Unity, I presume, right? As is Antonis? I've been using English and Greek layouts for more than 15 years on various desktop environments and have never seen this issue. Strange. Does this happen only when switching to Greek or also when switching from? I wonder if it could be remapping caps lock to another key in one of the two layouts. – terdon Oct 12 '16 at 10:29
  • @terdon Yes, I am using Unity (Ubuntu 16.04). I switch languages with alt+shift (left) but I also tried with ctrl+shift and ctrl+alt (left). I also tried having only English and German installed, the same (so it is probably not language-related). I also tried all the available options relevant to "use the same source for all windows". I remember the same behavior for a while (maybe always). – MakisH Oct 13 '16 at 01:28
  • It doesn't depend on the language. It just happens... I realized it when i started typing to a windows machine. Every time i was changing language my CAPS pressing was automatic, so it ruined my typing on windows because the caps reacted as it suppose to react. It stayed on. – Antonis Vlachos Jan 24 '17 at 12:41

1 Answers1

1

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.

anonymous2
  • 4,298
Panos
  • 26