23 if (prevState.mouseInfo.bmLeftButton == 0 && pmi->
bmLeftButton == 1)
26 if (prevState.mouseInfo.bmLeftButton == 1 && pmi->
bmLeftButton == 0)
29 if (prevState.mouseInfo.bmRightButton == 0 && pmi->
bmRightButton == 1)
32 if (prevState.mouseInfo.bmRightButton == 1 && pmi->
bmRightButton == 0)
35 if (prevState.mouseInfo.bmMiddleButton == 0 && pmi->
bmMiddleButton == 1)
38 if (prevState.mouseInfo.bmMiddleButton == 1 && pmi->
bmMiddleButton == 0)
41 if (prevState.mouseInfo.dX != pmi->
dX || prevState.mouseInfo.dY != pmi->
dY)
44 for (uint8_t i=0; i<3; i++)
45 prevState.bInfo[i] = buf[i];
56 for (uint8_t i=2; i<8; i++)
61 for (uint8_t j=2; j<8; j++)
63 if (buf[i] ==
prevState.bInfo[j] && buf[i] != 1)
76 for (uint8_t i=0; i<8; i++)
103 const uint8_t KeyboardReportParser::numKeys[]
PROGMEM = {
'!',
'@',
'#',
'$',
'%',
'^',
'&',
'*',
'(',
')' };
104 const uint8_t KeyboardReportParser::symKeysUp[]
PROGMEM = {
'_',
'+',
'{',
'}',
'|',
'~',
':',
'"',
'~',
'<',
'>',
'?' };
105 const uint8_t KeyboardReportParser::symKeysLo[]
PROGMEM = {
'-',
'=',
'[',
']',
'\\',
' ',
';',
'\'',
'`',
',',
'.',
'/' };
106 const uint8_t KeyboardReportParser::padKeys[]
PROGMEM = {
'/',
'*',
'-',
'+', 0x13 };
110 uint8_t shift = (mod & 0x22);
113 if (key > 0x03 && key < 0x1e)
118 return (key - 4 +
'A');
122 return (key - 4 +
'a');
125 else if (key > 0x1d && key < 0x27)
128 return ((uint8_t)pgm_read_byte(&numKeys[key - 0x1e]));
130 return (key - 0x1e +
'1');
133 else if (key > 0x58 && key < 0x62)
136 return (key - 0x59 +
'1');
138 else if (key > 0x2c && key < 0x39)
139 return ((shift) ? (uint8_t)pgm_read_byte(&symKeysUp[key-0x2d]) : (uint8_t)pgm_read_byte(&symKeysLo[key-0x2d]));
140 else if (key > 0x53 && key < 0x59)
141 return (uint8_t)pgm_read_byte(&padKeys[key - 0x54]);
148 case KEY_ZERO:
return((shift) ?
')' :
'0');