secondary menu
This commit is contained in:
parent
4870fd2fdf
commit
0b650fac1c
1 changed files with 25 additions and 6 deletions
31
input_dev.c
31
input_dev.c
|
|
@ -75,16 +75,35 @@ int input_filter_asus_kb(struct input_event* events, size_t* size, uint32_t* cou
|
||||||
}
|
}
|
||||||
|
|
||||||
return INPUT_FILTER_RESULT_DO_NOT_EMIT;
|
return INPUT_FILTER_RESULT_DO_NOT_EMIT;
|
||||||
} else if ((*count == 2) && (events[0].value == -13565896) && (events[1].type == EV_KEY) && (events[1].code == KEY_PROG1)) {
|
} else if ((*count == 2) && (*size >= 5) && (events[0].value == -13565896) && (events[1].type == EV_KEY) && (events[1].code == KEY_PROG1)) {
|
||||||
*count = 2;
|
*count = 2;
|
||||||
|
|
||||||
|
int32_t val = events[1].value;
|
||||||
|
struct timeval time = events[1].time;
|
||||||
|
|
||||||
events[0].type = EV_KEY;
|
events[0].type = EV_KEY;
|
||||||
events[0].code = BTN_MODE;
|
events[0].code = BTN_MODE;
|
||||||
events[0].value = events[1].value;
|
events[0].value = val;
|
||||||
|
|
||||||
events[1].type = EV_KEY;
|
events[1].type = SYN_REPORT;
|
||||||
events[1].code = BTN_SOUTH;
|
events[1].code = EV_SYN;
|
||||||
events[1].value = events[1].value;
|
events[1].value = 0;
|
||||||
|
events[1].time = events[0].time;
|
||||||
|
|
||||||
|
events[2].type = EV_KEY;
|
||||||
|
events[2].code = BTN_SOUTH;
|
||||||
|
events[2].value = 1;
|
||||||
|
events[2].time = time;
|
||||||
|
|
||||||
|
events[3].type = SYN_REPORT;
|
||||||
|
events[3].code = EV_SYN;
|
||||||
|
events[3].value = 0;
|
||||||
|
events[3].time = time;
|
||||||
|
|
||||||
|
events[4].type = EV_KEY;
|
||||||
|
events[4].code = BTN_SOUTH;
|
||||||
|
events[4].value = 0;
|
||||||
|
events[4].time = time;
|
||||||
|
|
||||||
return INPUT_FILTER_RESULT_OK;
|
return INPUT_FILTER_RESULT_OK;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue