I have a question on the source code. I've been playing around with it and modified buildReport as follows.
static void buildReport(void) { uchar mod = 0; uchar key = 0; KeyPress = rand() % 2;
if(reportCount == 0 && KeyPress == 0){ mod = 0; key = 0x04;}
if(reportCount == 0 && KeyPress == 1){ mod = 0xE1; key = 0x04;}
reportCount++; reportBuffer[0] = mod; /* modifiers */ reportBuffer[1] = key;}
If I use 0xE2 as a mod key I can simulate an Alt-Tab, but if I use E1 or E5 to try and simulate the shift key nothing happens. Is there any particular reason it wouldn't work?
More information about formatting options
I have a question on the
I have a question on the source code. I've been playing around with it and modified buildReport as follows.
static void buildReport(void)
{
uchar mod = 0;
uchar key = 0;
KeyPress = rand() % 2;
if(reportCount == 0 && KeyPress == 0){
mod = 0;
key = 0x04;}
if(reportCount == 0 && KeyPress == 1){
mod = 0xE1;
key = 0x04;}
reportCount++;
reportBuffer[0] = mod; /* modifiers */
reportBuffer[1] = key;}
If I use 0xE2 as a mod key I can simulate an Alt-Tab, but if I use E1 or E5 to try and simulate the shift key nothing happens. Is there any particular reason it wouldn't work?