erryox / Switchy

Switches languages by the Caps Lock key.
MIT License
233 stars 20 forks source link

[Bug] - Shift+CapsLock periodically randomly disables Switchy. It's like Shift+CapsLock = Alt+CapsLock. #14

Open Lucius-Will opened 7 months ago

Lucius-Will commented 7 months ago

The Single Caps key always works correctly. It always switches languages correctly. There are no problems with this.

The main task of the Shift+CapsLock shortcut is also always performed. This always enables and disables the "BIG LETTERS". It is with the on/off function of "BIG LETTERS" that there are no problems. The problem is in another part of the work of the Shift+CapsLock shortcut.


Switchy stops switching languages using the Caps button. Now the Caps button works again as a regular CapsLock - on/off "BIG LETTERS".

Even after this bug is triggered, the Shift+CapsLock shortcut continues to turn on/off the "BIG LETTERS". But. As I understand it, this is generally the default behavior of the Shift+CapsLock shortcut. Even if Switchy is not on the PC.


So, if at some point the Shift+CapsLock shortcut broke the language switching using the Caps single button, there are 2 ways to fix Switchy again.

1 - Turn off the "BIG LETTERS" with the CapsLock button or Shift+CapsLock -> hold down Alt and press Shift several times, switching between languages.

Then Switchy is activated again. Now Caps switches languages again.

2 - It happens that the first method does not work. Then you need to do the same thing, but with the addition of Alt+CapsLock at the end: Turn off the "BIG LETTERS" -> Switch languages several times using Alt+Shift -> And at the end, press Alt+CapsLock once.

Then Switchy is activated again. Now Caps switches languages again.


If the Shift+CapsLock shortcut did not break the Switchy, then Alt+CapsLock works well. I didn't notice any bugs with it. But I rarely use it either.

And if the Shift+CapsLock shortcut caused a bug, then Alt+CapsLock never helped me.

erryox commented 6 months ago

Hello! Thank you for reporting this issue. I was able to reproduce the problem on my end. As a result, I refactored the entire application, and now the issue is no longer reproducible. You can try out the preview build. I haven't been able to reproduce the second issue you reported yet, but it's possible that it's been resolved as well.

Please note that I removed the pop-up display function in this build. If you have any further questions or issues, feel free to reach out.

Lucius-Will commented 6 months ago

Hello! Thank you for reporting this issue. I was able to reproduce the problem on my end. As a result, I refactored the entire application, and now the issue is no longer reproducible. You can try out the preview build. I haven't been able to reproduce the second issue you reported yet, but it's possible that it's been resolved as well.

Please note that I removed the pop-up display function in this build. If you have any further questions or issues, feel free to reach out.

I tried this new preview version. And yes.

The bug with Shift+Caps is gone! Now this part is working completely correctly!

The second bug, with maximize/minimize windows in PyCharm, is gone too.

These 2 problems just disappeared.

It is a pity that the pop-up function has been removed. It helps a lot. It's much more convenient with pop-up function. Is the decision to remove pop-up temporary? Specific for the preview version? Or will the popup be removed in the stable version too?

erryox commented 6 months ago

I'm glad the bugs are gone! Regarding the pop-up function, I understand it's helpful for you. I plan to release a new version with the popup feature back in place, along with these fixes. So, stay tuned for the upcoming release!

Lucius-Will commented 6 months ago

Awesome! Now the program will be perfect! I love it. With this app, working on a computer for non-English speakers is much more convenient, more comfortable and more enjoyable. Thank you so much for such a helpful assistant.

erryox commented 6 months ago

Here's the new build with the popup functionality restored. However, there are some issues with pressing combinations like Alt+CapsLock or Shift+CapsLock while the popup is enabled. The language still switches if you press CapsLock first and then one of these keys, although this shouldn't happen. To ensure everything works as expected, you need to press these keys in the right order: first the Alt or Shift modifier key and then CapsLock. I've tried various approaches to fix it, but nothing has worked so far.

So, you can try out this preview version for now, and I'll work on fixing this issue for the official release.

Lucius-Will commented 6 months ago

Interesting. In the last link with the returned pop-up, there is also no bug with Shift+Caps. And switching the language using the Caps key also works fine.

And indeed, Shift+Caps and Alt+Caps only work if I press these buttons in the correct order.

But it's interesting. In this version, the bug with maximize/minimize windows in PyCharm has returned again.

In principle, this version can already be used. I switched from PyCharm to VS Code for several reasons. So the bug with resizing windows is no longer critical for me. And pressing the keys in the correct order is not a big problem. The main thing is that now Shift+Caps does not cause a bug.

Until a stable release is released, I will use this version.

Thank you again. If I find any bugs, I will notify you about them.

Lucius-Will commented 6 months ago

Interesting. About the bug with "maximize/minimize windows in PyCharm" in the latest version. When Switchy has just been turned on, and if I don't press Caps, then the bug doesn't work. But after the first click on Caps, the bug is triggered. Even if I paused the Switch by Alt+Caps, then switching the language by single Caps is really disabled. But the bug does not disappear.

The only way to fix this bug is to disable or restart the entire Switchy program. But the bug will appear again as soon as the first time I press single Caps.

Interestingly, if to pause Switchy with Alt+Caps and then press the up/down arrow, a small white window will appear in the upper left corner. This also happens only with Switchy and only after Switchy is paused by Alt+Caps and the up/down button is pressed.

Apparently, the small window has something associated with this bug.

Снимок экрана 2024-04-07 220322

And in the non-pop-up version, I still couldn't trigger this "maximize/minimize windows in PyCharm" bug.

WallK commented 2 months ago

I have a similar problem If I press Shift+CAPS or CAPS+Shift (left Shift specifically, right doesn't work) -- CapsLock status will change and CapsLock button will be changing it from now on (and not changing layout) If I press just Shift after that -- CapsLock button will start changing layouts again This is the only way to get back the layout changing functionality after Shift+CAPS I've found