Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added support for Keyboard Led status codes #61

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

Open
PJ789 wants to merge 8 commits into arduino-libraries:master
base: master
Choose a base branch
Loading
from PJ789:LED-Status-Codes

Conversation

Copy link
Contributor

@PJ789 PJ789 commented Dec 26, 2021

This pull request adds support for LED status reports from the host, based on code here, with some minor enhancements for legibility sake;-
https://forum.arduino.cc/t/leonardo-keyboard-leds-emulation/169582/23

SukkoPera and Dakkaron reacted with thumbs up emoji
PJ789 added 4 commits December 10, 2021 15:29
KeyboardLayout_da_DK.cpp is Danish keyboard layout
Keyboard.h references da_DK.cpp
Keyboard_da_DK.h defines scan codes for Danish characters such as ÆØ.
Changed scan code for bslash as suggested by @edgar-bonnet
@per1234 per1234 added the type: enhancement Proposed improvement label Dec 26, 2021
Copy link
Contributor Author

PJ789 commented Dec 26, 2021

Note this pull request has dependencies on another pull request in the ArduinoCore-avr HID library;-

ArduinoCore-avr pull request 446

... and will not compile unless & until that dependency is approved.

Copy link
Contributor Author

PJ789 commented Dec 26, 2021

Usage example;-

`

 if (Keyboard.getLedStatus(LED_CAPS_LOCK))
 {
 Serial.print("Cap Lock on ");
 }
 if (Keyboard.getLedStatus(LED_SCROLL_LOCK))
 {
 Serial.print("Scroll Lock on ");
 }
 if (Keyboard.getLedStatus(LED_NUM_LOCK))
 {
 Serial.print("Num Lock on ");
 }
 Serial.println(); 

`

PJ789 and others added 2 commits January 1, 2022 10:29
Co-authored-by: Edgar Bonet <edgar-bonet@users.noreply.github.com>
@per1234 per1234 added topic: code Related to content of the project itself status: blocked Progress on this prevented by an external cause labels Mar 6, 2022
@per1234 per1234 linked an issue Mar 6, 2022 that may be closed by this pull request
Copy link

60999 commented May 8, 2022

Excuse me, what's the progress now? Has the problem been solved?

bodo2all reacted with thumbs up emoji

Copy link
Contributor Author

PJ789 commented May 9, 2022

@60999 ... the code does work (I have a keyboard based on the changed code I use daily) but requires you to patch the Keyboard library AND ArduinoCore-avr HID library too (and I suspect that is why it is marked blocked, because the dependency on the core library code).

Applying the two patches is easy enough to do, assuming you're confident about overwriting the two affected libraries with the submitted code.

per1234, AllCheeks, and Dakkaron reacted with thumbs up emoji

Copy link

AllCheeks commented Jun 18, 2022
edited
Loading

@60999 ... the code does work (I have a keyboard based on the changed code I use daily) but requires you to patch the Keyboard library AND ArduinoCore-avr HID library too (and I suspect that is why it is marked blocked, because the dependency on the core library code).

Applying the two patches is easy enough to do, assuming you're confident about overwriting the two affected libraries with the submitted code.

It turns out that you also noticed this small detail awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@edgar-bonet edgar-bonet edgar-bonet left review comments

Assignees
No one assigned
Labels
status: blocked Progress on this prevented by an external cause topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Allow retrieving Caps/Num/Scroll Lock Status

AltStyle によって変換されたページ (->オリジナル) /