-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VoodooPS2: Need improvements on using Caps Lock key to change input source #435
Comments
@vit9696 Thank you for pointing out. It’s a good work around, but is it possible that the Caps Lock key can be used to change input source just like a native Mac? |
Well, the thing does not work well for me even on USB keyboard. The related cause of the issue seems to rest here. I will reopen the issue, but we have no plans to work on it any soon. |
I have updated the workaround to the following (I just assumed that Sierra and High Sierra require the "full" workaround while I can only test on Mojave and I need to only fire key_down + key_up): diff --git a/VoodooPS2Keyboard/VoodooPS2Keyboard.cpp b/VoodooPS2Keyboard/VoodooPS2Keyboard.cpp
index ee3bcaf..d7f4fb4 100644
--- a/VoodooPS2Keyboard/VoodooPS2Keyboard.cpp
+++ b/VoodooPS2Keyboard/VoodooPS2Keyboard.cpp
@@ -1747,13 +1747,17 @@ bool ApplePS2Keyboard::dispatchKeyboardEventWithPacket(const UInt8* packet)
//REVIEW: work around for caps lock bug on Sierra 10.12...
if (adbKeyCode == 0x39 && version_major >= 16)
{
- if (goingDown)
+ // Mojave 10.14 only needs a part of the workaround:
+ // https://github.com/RehabMan/OS-X-Voodoo-PS2-Controller/issues/142#issuecomment-529813842
+ if (goingDown || version_major >= 18)
{
- static bool firsttime = true;
clock_get_uptime(&now_abs);
dispatchKeyboardEventX(adbKeyCode, true, now_abs);
clock_get_uptime(&now_abs);
dispatchKeyboardEventX(adbKeyCode, false, now_abs);
+ }
+ if (goingDown && version_major < 18) {
+ static bool firsttime = true;
if (!firsttime)
{
clock_get_uptime(&now_abs); Should I send a PR? Here is the kext: I can now use CapsLock to switch language layouts (configured via native MacOS preferences) and Ctrl + CapsLock toggles the upper/lower-case modes on my Lenovo y50-70 Mojave! Thank you for your hard work! |
I think that version checks are not needed. Sierra and High Sierra had issues when using 'full' workaround but it was still better than having a four-state Caps Lock button without the workaround. I'll check your patch and merge if it works. |
@frol It works, thanks! |
After enabling
Use the Caps Lock key to switch to and from ABC
, the input sources can't be changed by pressing Caps Lock, and there's an inconsistency issue between Caps Lock button light and lowercase or uppercase status.However, in some circumstances, using Caps Lock to change input sources is working, like the address bar in
Safari.app
,Xcode
, or editing markdown files, etc. In these circumstances,Use the Caps Lock key to switch to and from ABC
option can't control Caps Lock's behavior - pressing Caps Lock key will always shift input sources.Related issues in Rehabman's repo:
RehabMan/OS-X-Voodoo-PS2-Controller#154
RehabMan/OS-X-Voodoo-PS2-Controller#142
This issue happened when using Simplified Chinese and English input sources.
The text was updated successfully, but these errors were encountered: