LangSwitch icon indicating copy to clipboard operation
LangSwitch copied to clipboard

Not working with Caps Lock on

Open m-emelchenkov opened this issue 10 months ago • 7 comments

App version 1.3.0. Issue: can not switch language when Caps Lock is on.

m-emelchenkov avatar Jan 11 '25 07:01 m-emelchenkov

Up

arnlyamr avatar Mar 03 '25 09:03 arnlyamr

Faced with the same problem, up

eevloeev avatar Apr 16 '25 13:04 eevloeev

Sorry for my late reply and thank you for your feedback. I have improved the handling of Caps Lock in the new version - now, Caps Lock works normally and you can switch languages with the Fn key even when Caps Lock is enabled. However, there's still a limitation: when you press the Fn key to switch languages, macOS may turn Caps Lock off afterwards. Unfortunately, this is caused by restrictions in newer versions of macOS - the system does not allow regular applications (without special permissions or kernel extensions) to fully control the Caps Lock state programmatically and securely. I don't want to require users to grant extra "Accessibility" permissions, as this would complicate installation and could raise privacy concerns. So for now, this is the best possible behavior without sacrificing your system’s security and privacy. Please try the new build and let me know if it feels better now. https://github.com/Nikeev/LangSwitch/releases/tag/v1.3.1 Thanks)

Nikeev avatar Apr 17 '25 10:04 Nikeev

Hello! I'll definitely install the new version and test. However, adding extra "Accessibility" permissions is a common practice nowadays. All services apps require it, like: Zoom, SoundSource, Pure Paste, Monitor Control, Maccy, AnyDesk and so on. So if adding your app to Accessibility will solve the issue, then it's a good and straightforward way.

m-emelchenkov avatar Apr 17 '25 15:04 m-emelchenkov

I tried. It turns off Caps Lock after each language switch.

m-emelchenkov avatar Apr 17 '25 15:04 m-emelchenkov

Likewise, I'd gladly accept any permission required, this thing bugs mel like crazy! Maybe have 2 versions? one with the requirements and one without?

arsentsn avatar May 01 '25 07:05 arsentsn

Hi, I've tried addressing the Caps Lock issue using approaches involving Accessibility permissions and also attempting direct programmatic control (using CGEventPost with Input Monitoring permissions). However, the problems with Caps Lock state management persist after switching layouts :(

I don't specialize in macOS app development, so unfortunately, I'm unable to fully get to the bottom of this specific Caps Lock behavior. Sharing this in case it helps others looking into it.

Nikeev avatar May 12 '25 10:05 Nikeev