I'm having an issue with reading keyboar_leds and I'm unsure is it's the OS (OSX) that's just not sending the information.
Running on a Teensy 4.0.
I have 3 keys CAPS_LOCK, NUM_LOCK and SCROLL_LOCK all of which I'd expect to be in keyboard_leds if they are active. However I'm only getting CAPS_LOCK being returned as active
The code just outputs what's received in keyboar_leds
It is a mac thing that it keyboard_leds doesn't get populated or am I missing something ?
Thanks
Running on a Teensy 4.0.
I have 3 keys CAPS_LOCK, NUM_LOCK and SCROLL_LOCK all of which I'd expect to be in keyboard_leds if they are active. However I'm only getting CAPS_LOCK being returned as active
Code:
KEY_CAPS_LOCK
07:48:20.603 -> Setting up
07:48:29.573 -> ROW:0 COL:10 PRESSED. SWITCH: 1
07:48:29.573 -> LAYER: 0 INDEX: 10 Press: 1
07:48:29.679 -> LAYER: 0 INDEX: 10 Press: 0
07:48:29.679 ->[B] [COLOR="#FF0000"]LEDS: 00000010[/COLOR][/B] <-- CAPS_LOCK on
07:48:35.568 -> ROW:0 COL:10 PRESSED. SWITCH: 1
07:48:35.568 -> LAYER: 0 INDEX: 10 Press: 1
07:48:35.673 -> LAYER: 0 INDEX: 10 Press: 0
07:48:35.673 -> [B]LEDS: 00000000[/B] <-- CAPS_LOCK off
Code:
KEY_SCROLL_LOCK
07:49:05.887 -> ROW:0 COL:9 PRESSED. SWITCH: 1
07:49:05.887 -> LAYER: 0 INDEX: 9 Press: 1
07:49:05.959 -> LAYER: 0 INDEX: 9 Press: 0
07:49:05.959 -> [B][COLOR="#FF0000"]LEDS: 00000000[/COLOR][/B] <-- SCROLL_LOCK on
07:49:16.952 -> ROW:0 COL:9 PRESSED. SWITCH: 1
07:49:16.952 -> LAYER: 0 INDEX: 9 Press: 1
07:49:17.061 -> LAYER: 0 INDEX: 9 Press: 0
07:49:17.061 -> [B]LEDS: 00000000[/B] <-- SCROLL_LOCK off
Code:
KEY_NUM_LOCK
07:53:19.817 -> ROW:0 COL:11 PRESSED. SWITCH: 1
07:53:19.817 -> LAYER: 0 INDEX: 11 Press: 1
07:53:19.993 -> LAYER: 0 INDEX: 11 Press: 0
07:53:19.993 -> [B][COLOR="#FF0000"]LEDS: 00000000[/COLOR][/B] <-- NUM_LOCK on
07:53:20.983 -> ROW:0 COL:11 PRESSED. SWITCH: 1
07:53:20.983 -> LAYER: 0 INDEX: 11 Press: 1
07:53:21.127 -> LAYER: 0 INDEX: 11 Press: 0
07:53:21.127 -> [B]LEDS: 00000000[/B] <-- NUM_LOCK on
The code just outputs what's received in keyboar_leds
Code:
void printBin(byte aByte) {
for (int8_t aBit = 7; aBit >= 0; aBit--)
Serial.write(bitRead(aByte, aBit) ? '1' : '0');
}
printBin(keyboard_leds);
It is a mac thing that it keyboard_leds doesn't get populated or am I missing something ?
Thanks