25 if (prevState.mouseInfo.bmLeftButton == 0 && pmi->
bmLeftButton == 1)
28 if (prevState.mouseInfo.bmLeftButton == 1 && pmi->
bmLeftButton == 0)
31 if (prevState.mouseInfo.bmRightButton == 0 && pmi->
bmRightButton == 1)
34 if (prevState.mouseInfo.bmRightButton == 1 && pmi->
bmRightButton == 0)
37 if (prevState.mouseInfo.bmMiddleButton == 0 && pmi->
bmMiddleButton == 1)
40 if (prevState.mouseInfo.bmMiddleButton == 1 && pmi->
bmMiddleButton == 0)
43 if (prevState.mouseInfo.dX != pmi->
dX || prevState.mouseInfo.dY != pmi->
dY)
47 for (uint8_t i = 0; i<
sizeof (
MOUSEINFO); i++)
48 prevState.bInfo[i] = buf[i];
68 if(prevState.mouseInfo.bmLeftButton != pmi->
bmLeftButton ) {
108 if(pmi->
dX || pmi->
dY) {
122 prevState.bInfo[0] = buf[0];
135 if (
prevState.bInfo[0x00] != buf[0x00]) {
139 for (uint8_t i = 2; i < 8; i++) {
143 for (uint8_t j = 2; j < 8; j++) {
144 if (buf[i] ==
prevState.bInfo[j] && buf[i] != 1)
156 for (uint8_t i = 0; i < 8; i++)
160 const uint8_t KeyboardReportParser::numKeys[10] PROGMEM = {
'!',
'@',
'#',
'$',
'%',
'^',
'&',
'*',
'(',
')'};
161 const uint8_t KeyboardReportParser::symKeysUp[12] PROGMEM = {
'_',
'+',
'{',
'}',
'|',
'~',
':',
'"',
'~',
'<',
'>',
'?'};
162 const uint8_t KeyboardReportParser::symKeysLo[12] PROGMEM = {
'-',
'=',
'[',
']',
'\\',
' ',
';',
'\'',
'`',
',',
'.',
'/'};
163 const uint8_t KeyboardReportParser::padKeys[5] PROGMEM = {
'/',
'*',
'-',
'+', 0x13};
166 uint8_t shift = (mod & 0x22);
173 return (key - 4 +
'A');
177 return (key - 4 +
'a');
187 return (key - 0x59 +
'1');
#define UHS_HID_BOOT_KEY_PERIOD
virtual const uint8_t * getSymKeysLo()
virtual void OnRightButtonDown(MOUSEINFO *mi)
virtual void OnKeyDown(uint8_t mod, uint8_t key)
virtual uint8_t HandleLockingKeys(HID *hid, uint8_t key)
virtual void OnMiddleButtonUp(MOUSEINFO *mi)
void Parse(HID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf)
#define UHS_HID_BOOT_KEY_ZERO2
#define pgm_read_byte(addr)
#define UHS_HID_BOOT_KEY_ZERO
virtual void OnKeyUp(uint8_t mod, uint8_t key)
void Parse(HID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf)
virtual const uint8_t * getSymKeysUp()
virtual void OnLeftButtonUp(MOUSEINFO *mi)
#define UHS_HID_BOOT_KEY_SPACE
virtual void OnMouseMove(MOUSEINFO *mi)
virtual void OnRightButtonUp(MOUSEINFO *mi)
#define VALUE_WITHIN(v, l, h)
virtual void OnMiddleButtonDown(MOUSEINFO *mi)
#define UHS_HID_BOOT_KEY_ENTER
union KeyboardReportParser::@17 prevState
virtual void OnControlKeysChanged(uint8_t before, uint8_t after)
virtual void OnLeftButtonDown(MOUSEINFO *mi)
virtual const uint8_t * getNumKeys()
union KeyboardReportParser::@18 kbdLockingKeys
virtual const uint8_t * getPadKeys()
uint8_t OemToAscii(uint8_t mod, uint8_t key)