KurtE
Senior Member+
@Paul @mcrc - I am thinking we probably should have an example keyboard forward sketch in the library...
Also wondering if we should Pull in the PRs from a couple of years ago to help with this and/or do similar...
But: I did verify that:
Appears to work, at least when I tried it on Keyboard only.
I built it and ran it with my old Dell keyboard, and when I press the Calculator key on the keyboard, it brought up the calculator app...
Note: this was based semi on the code in the MediaButtons Example under USB Type keyboard
Also wondering if we should Pull in the PRs from a couple of years ago to help with this and/or do similar...
But: I did verify that:
Code:
void OnHIDExtrasPress(uint32_t top, uint16_t key)
{
if (top == 0xc0000) {
Keyboard.press(0XE400 | key);
}
}
void OnHIDExtrasRelease(uint32_t top, uint16_t key)
{
if (top == 0xc0000) {
Keyboard.release(0XE400 | key);
}
}
I built it and ran it with my old Dell keyboard, and when I press the Calculator key on the keyboard, it brought up the calculator app...
Note: this was based semi on the code in the MediaButtons Example under USB Type keyboard