22 if (prevState.mouseInfo.bmLeftButton == 0 && pmi->
bmLeftButton == 1)
25 if (prevState.mouseInfo.bmLeftButton == 1 && pmi->
bmLeftButton == 0)
28 if (prevState.mouseInfo.bmRightButton == 0 && pmi->
bmRightButton == 1)
31 if (prevState.mouseInfo.bmRightButton == 1 && pmi->
bmRightButton == 0)
34 if (prevState.mouseInfo.bmMiddleButton == 0 && pmi->
bmMiddleButton == 1)
37 if (prevState.mouseInfo.bmMiddleButton == 1 && pmi->
bmMiddleButton == 0)
40 if (prevState.mouseInfo.dX != pmi->
dX || prevState.mouseInfo.dY != pmi->
dY)
44 for (uint8_t i = 0; i<
sizeof (
MOUSEINFO); i++)
45 prevState.bInfo[i] = buf[i];
60 for (uint8_t i = 2; i < 8; i++) {
64 for (uint8_t j = 2; j < 8; j++) {
65 if (buf[i] ==
prevState.bInfo[j] && buf[i] != 1)
77 for (uint8_t i = 0; i < 8; i++)
102 const uint8_t KeyboardReportParser::numKeys[] PROGMEM = {
'!',
'@',
'#',
'$',
'%',
'^',
'&',
'*',
'(',
')'};
103 const uint8_t KeyboardReportParser::symKeysUp[] PROGMEM = {
'_',
'+',
'{',
'}',
'|',
'~',
':',
'"',
'~',
'<',
'>',
'?'};
104 const uint8_t KeyboardReportParser::symKeysLo[] PROGMEM = {
'-',
'=',
'[',
']',
'\\',
' ',
';',
'\'',
'`',
',',
'.',
'/'};
105 const uint8_t KeyboardReportParser::padKeys[] PROGMEM = {
'/',
'*',
'-',
'+', 0x13};
108 uint8_t shift = (mod & 0x22);
111 if (key > 0x03 && key < 0x1e) {
115 return (key - 4 +
'A');
119 return (key - 4 +
'a');
121 else if (key > 0x1d && key < 0x27) {
123 return ((uint8_t)pgm_read_byte(&numKeys[key - 0x1e]));
125 return (key - 0x1e +
'1');
127 else if (key > 0x58 && key < 0x62) {
129 return (key - 0x59 +
'1');
130 }
else if (key > 0x2c && key < 0x39)
131 return ((shift) ? (uint8_t)pgm_read_byte(&symKeysUp[key - 0x2d]) : (uint8_t)pgm_read_byte(&symKeysLo[key - 0x2d]));
132 else if (key > 0x53 && key < 0x59)
133 return (uint8_t)pgm_read_byte(&padKeys[key - 0x54]);
138 case KEY_ZERO:
return ((shift) ?
')':
'0');