int PortableKeyEvent(int state, int code){ //LOGI("PortableKeyEvent %d %d",state,code); struct eventlist_s *ev = in_newevent(); if (!ev) return 0; ev->scancode = code; ev->unicode = code; ev->state = state; in_finishevent(); return 0; }
int add_choc_event(evtype_t type, int data1, int data2, int data3){ //LOGI("PortableKeyEvent %d %d",state,code); event_t *ev = in_newevent(); if (!ev) return 0; ev->type = type; ev->data1 = data1; ev->data2 = data2; ev->data3 = data3; in_finishevent(); return 0; }
int PortableKeyEvent(int state, int code, int unicode){ LOGI("PortableKeyEvent state = %d, code = %d, unicode = %d",state,code,unicode); struct eventlist_s *ev = in_newevent(); if (!ev) return 0; ev->scancode = code; ev->unicode = unicode; ev->state = state; if (code == A_BACKSPACE) ev->unicode = A_BACKSPACE; in_finishevent(); return 0; }