The patches no longer match the file structure of Arduino (using 1.6.x).
Does anyone have an updated patch?
mic159:
The patches no longer match the file structure of Arduino (using 1.6.x).
Does anyone have an updated patch?
I'm in the same boat here. I need the LED detection for my project. I found this library which supports reading LED status GitHub - NicoHood/HID: Bring enhanced HID functions to your Arduino! , but when I use the library my Arduino no longer gets properly detected in OSX. Windows and Linux work fine though.
I attach new diffs valid for the Arduino IDE 1.8.1
I have made a small change in the way it should be used in the sketch.
Keyboard.getLedStatus(LED_CAPS_LOCK)
returns true if the Caps Lock led is on, and false if the Caps Lock led is off.
Keyboard.getLedStatus(LED_NUM_LOCK)
returns true if the Num Lock led is on, and false if the Num Lock led is off.
Keyboard.getLedStatus(LED_SCROLL_LOCK)
returns true if the Scroll Lock led is on, and false if the Scroll Lock led is off.
HID.diff.txt (1.54 KB)
Keyboard.diff.txt (2.52 KB)
Being arduino IDE opensource, can't this changes be directly implemented there by somebody able to do it?
I don't know how to recompile an IDE from scratch. ![]()
jumpjack:
Being arduino IDE opensource, can't this changes be directly implemented there by somebody able to do it?
I don't know how to recompile an IDE from scratch.
I was able to make this work on version 1.8.4
Here are the patched files.
path for the keyboard files: C:\Program Files (x86)\Arduino\libraries\Keyboard\src
path for the HID files: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\HID\src
I hope this helps, it took me a while to figure out how this works.
Keyboard.cpp (10.1 KB)
Keyboard.h (2.87 KB)
HID.cpp (4.67 KB)
HID.h (3.5 KB)
Hello,
That's what I need to finish my project (Cherry G81-3000HAD 1986).
Unfortunately I always get the same error message when compiling:
C:\Program Files (x86)\Arduino\libraries\Keyboard\src\Keyboard.cpp: In member function 'bool Keyboard_::getLedStatus(uint8_t)':
C:\Program Files (x86)\Arduino\libraries\Keyboard\src\Keyboard.cpp:332:38: error: 'class HID_' has no member named 'getKeyboardLedsStatus'
uint8_t _keyboardLedsStatus = HID().getKeyboardLedsStatus();
^
exit status 1
Fehler beim Kompilieren für das Board Arduino Leonardo.
Can someone help me? I can not find a solution.
I downloaded the files from "furtrader".
Thanks, Ivko.
Hi,
just notice, ivko case is fact that you need to do diff on all 4 files, HiD.h, HID.cpp, Keyboard.h and Keyboard.h
The diffs from xxDaViDxx in post #22 still apply mostly cleanly to 1.8.13 and appear to be working fine.
Therefore I have asked for inclusion of this patch upstream.
Thanks to everybody who contributed.