Cannot make it work :(
This commit is contained in:
parent
0b650fac1c
commit
89dd90c91b
4 changed files with 9 additions and 5 deletions
|
|
@ -88,22 +88,18 @@ int input_filter_asus_kb(struct input_event* events, size_t* size, uint32_t* cou
|
|||
events[1].type = SYN_REPORT;
|
||||
events[1].code = EV_SYN;
|
||||
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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#include "queue.h"
|
||||
#include "message.h"
|
||||
|
||||
#define INCLUDE_INPUT_DEBUG
|
||||
#undef INCLUDE_INPUT_DEBUG
|
||||
#undef IGNORE_INPUT_SCAN
|
||||
|
||||
#define INPUT_DEV_CTRL_FLAG_EXIT 0x00000001U
|
||||
|
|
|
|||
|
|
@ -24,6 +24,12 @@ int create_output_dev(const char* uinput_path, const char* name, output_dev_type
|
|||
dev.id.product = OUTPUT_DEV_PRODUCT_ID;
|
||||
dev.id.version = OUTPUT_DEV_VERSION;
|
||||
|
||||
#if defined(UI_SET_PHYS_STR)
|
||||
ioctl(fd, UI_SET_PHYS_STR, PHYS_STR);
|
||||
#else
|
||||
#warning Controller and gyroscope won't be recognized as a single device
|
||||
#endif
|
||||
|
||||
switch (type) {
|
||||
case output_dev_imu: {
|
||||
ioctl(fd, UI_SET_PROPBIT, INPUT_PROP_ACCELEROMETER);
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@
|
|||
#define OUTPUT_DEV_PRODUCT_ID 0x0ce6
|
||||
*/
|
||||
|
||||
#define PHYS_STR "00:11:22:33:44:55"
|
||||
|
||||
#define OUTPUT_DEV_CTRL_FLAG_EXIT 0x00000001U
|
||||
#define OUTPUT_DEV_CTRL_FLAG_DATA 0x00000002U
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue