Open WallaceIT opened 8 years ago
Hi, It's ctrl+shift modifier, see https://gist.github.com/MightyPork/6da26e382a7ad91b5496ee55fdc73db2
Hi! I don't know if I'm blind or I don't have the sufficient coding skills but I'm still unable to see anything that confirms your statement. In the line 39 of the code you provided there is a commented line which says:
0x03 // Keyboard Error Undefined
And no other 0x03 is found in the whole file. Am I missing something?
Hi! Byte 0 is reserved for modifier mask. In my code, 0x01 (lctrl) is OR'ed with 0x02 (lshift) to provide ctrl+shift modifier (0x03). The 0x03 you are referring to is related to scan codes (bytes 2 to 7).
In this example, the device is seen as an HID keyboard. When a pin (in this case RA3) is sensed low, a CTRL+SHIFT+1 keypress is sent to the OS.
Code comes from the hid_mouse example.
Signed-off-by: Francesco Valla valla.francesco@gmail.com