Skip to content
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

Fix Caps Lock LED not working properly. #7

Merged
merged 3 commits into from
Jan 27, 2020

Conversation

Goshin
Copy link
Contributor

@Goshin Goshin commented Jan 24, 2020

Hi,

#3 fixed the Caps Lock functionality, but the LED still works in a strange way.

The LED is always lighted when the caps lock is pressed and turns off when it is released, just like a blink.

In the log:

kernel: (kernel) ApplePS2Keyboard: Caps Lock goingDown: 0x1 # pressed
kernel: (kernel) ApplePS2Keyboard: setAlphaLockFeedback locked:0x1 # turn on LED, should be ignored
kernel: (kernel) ApplePS2Keyboard: setAlphaLockFeedback locked:0x1 # This is the true state change.
kernel: (kernel) ApplePS2Keyboard: Caps Lock goingDown: 0x0 #released
kernel: (kernel) ApplePS2Keyboard: setAlphaLockFeedback locked:0x0 # turn off LED, should be ignored

The true state change for LED was overridden in the period.

This fix is to ignore the LED changes after caps lock key going down and going up.
It should work for both a long press and a short press when changing caps state and input source.

Note that there seems to be a system bug for Catalina. The caps state LED doesn't work sometimes. You may need to toggle (enable and disable) the option in Keyboard -> Input Sources -> Use the Caps Lock key to switch ....

@vit9696 vit9696 requested a review from usr-sse2 January 25, 2020 00:33
Copy link
Contributor

@usr-sse2 usr-sse2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your excellent work! This fix works correctly in both language switching and caps lock modes, even when swapping Caps Lock with some other modifier key like Control.
Please fix the spelling in your code before I merge this pull request (_ignoreCapsLedChagnge should be spelled _ignoreCapsLedChange, without extra g).

@vit9696
Copy link
Contributor

vit9696 commented Jan 27, 2020

Looks like there is still one more left:
https://travis-ci.com/acidanthera/VoodooPS2/jobs/280374759#L196

@vit9696
Copy link
Contributor

vit9696 commented Jan 27, 2020

REF: acidanthera/bugtracker#514

@Goshin
Copy link
Contributor Author

Goshin commented Jan 27, 2020

Looks like there is still one more left:
https://travis-ci.com/acidanthera/VoodooPS2/jobs/280374759#L196

@usr-sse2 @vit9696
Thank you so much for your careful review.

@usr-sse2 usr-sse2 merged commit fc559c8 into acidanthera:master Jan 27, 2020
@Mateo1234454545
Copy link

Problem still exists on latest release.

@Goshin
Copy link
Contributor Author

Goshin commented Feb 4, 2020

Problem still exists on latest release.

Use the debug kext and see if you can get some log when switching the caps lock.

@Mateo1234454545
Copy link

Problem still exists on latest release.

Use the debug kext and see if you can get some log when switching the caps lock.

Screen Shot 2020-02-04 at 19 58 27

@Goshin
Copy link
Contributor Author

Goshin commented Feb 4, 2020

@Mateo1234454545
Well, it seems the debug version does not define the DEBUG_MSG Marco, so it does not print the log we want. Try this one:

VoodooPS2Controller-2.1.1-RELEASE.zip

btw what is your OS version?

@Mateo1234454545
Copy link

Will try tomorrow.
I'm on Catalina 10.15.3

@Mateo1234454545
Copy link

Problem is more obvious on Big Sur.
Hope someone fixes it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants