I want to configure this program to work when I press Win_L.
Using xev I found:
KeyRelease event, serial 38, synthetic NO, window 0xc00001,
root 0x79c, subw 0x0, time 14661661, (-529,393), root:(342,858),
state 0x40, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
I did the following patch:
diff --git a/keyboard_mouse.c b/keyboard_mouse.c
index 6832891..9665aa1 100644
--- a/keyboard_mouse.c
+++ b/keyboard_mouse.c
@@ -263,6 +263,7 @@ extern int main(int argc, const char *argv[])
sizeof(struct input_event));
if (read_count != sizeof(struct input_event))
break;
+ fprintf(stderr, "Incomingt %d.\n", incoming[0].type);
switch (buffer_position)
{
case 0:
@@ -303,9 +304,11 @@ extern int main(int argc, const char *argv[])
goto do_write;
int x, y;
int button_code;
+ fprintf(stderr, "Input %d.\n", incoming[1].code);
+
switch (incoming[1].code)
{
- case 126:
+ case 133:
super_held = (incoming[1].value != 0);
break;
case 17: /* W */
However, pressing and holding the Win_L together with E or any other key down not move the mouse pointer. What am I missing here?
Also, here are my input devices:
$ ls /dev/input/by-id/
usb-0911_2188-event-if01 usb-Compx_2.4G_Receiver-if01-mouse
usb-0911_2188-event-kbd usb-Hantick_USB_Keyboard_HID_Composite_device-event-if01
usb-0911_2188-if01-event-mouse usb-Hantick_USB_Keyboard_HID_Composite_device-event-kbd
usb-0911_2188-if01-mouse usb-Hantick_USB_Keyboard_HID_Composite_device-if01-event-mouse
usb-Compx_2.4G_Receiver-event-if01 usb-Hantick_USB_Keyboard_HID_Composite_device-if01-mouse
usb-Compx_2.4G_Receiver-event-kbd usb-Sonix_Technology_Co.__Ltd._HP_HD_Camera-event-if00
usb-Compx_2.4G_Receiver-if01-event-mouse
and how i run the programm:
sudo ./keyboard_mouse /dev/input/by-id/usb-0911_2188-event-if01
I want to configure this program to work when I press Win_L.
Using xev I found:
I did the following patch:
However, pressing and holding the Win_L together with E or any other key down not move the mouse pointer. What am I missing here?
Also, here are my input devices:
and how i run the programm: