Вопрос не совсем по xneur:
Почему-то каждый KeyPress для модификаторов предваряется лишним KeyRelease:
[TRA] 21:10:18 Получено KeyRelease 'Control_L' (тип события 3)
[TRA] 21:10:18 Получено KeyPress 'Control_L' (тип события 2)
[TRA] 21:10:18 Получено KeyRelease 'Control_L' (тип события 3)
[TRA] 21:10:19 Получено KeyRelease 'Shift_L' (тип события 3)
[TRA] 21:10:19 Получено KeyPress 'Shift_L' (тип события 2)
[TRA] 21:10:19 Получено KeyRelease 'Shift_L' (тип события 3)
[TRA] 21:10:21 Получено KeyPress 'ISO_Level3_Shift' (тип события 2)
[TRA] 21:10:21 Получено KeyRelease 'ISO_Level3_Shift' (тип события 3)
[TRA] 21:10:25 Получено KeyRelease 'Shift_R' (тип события 3)
[TRA] 21:10:25 Получено KeyPress 'Shift_R' (тип события 2)
[TRA] 21:10:25 Получено KeyRelease 'Shift_R' (тип события 3)
[TRA] 21:10:27 Получено KeyRelease 'Control_R' (тип события 3)
[TRA] 21:10:27 Получено KeyPress 'Control_R' (тип события 2)
[TRA] 21:10:27 Получено KeyRelease 'Control_R' (тип события 3)
[TRA] 21:10:29 Получено KeyPress 'Tab' (тип события 2)
[TRA] 21:10:29 Получено KeyRelease 'Tab' (тип события 3)
[TRA] 21:10:30 Получено KeyRelease 'Control_R' (тип события 3)
[TRA] 21:10:30 Получено KeyPress 'Control_R' (тип события 2)
[TRA] 21:10:30 Получено KeyRelease 'Control_R' (тип события 3)
[TRA] 21:10:37 Получено KeyPress 'q' (тип события 2)
[TRA] 21:10:37 Получено KeyRelease 'q' (тип события 3)
Сначала я решил, что проблема в xneur. Но посмотрев события через xev, обнаружил следующее. На его собственное окно события приходят как ожидается:
KeyPress event, serial 38, synthetic NO, window 0x1c00001,
root 0x199, subw 0x0, time 14595696, (950,266), root:(953,688),
state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 41, synthetic NO, window 0x1c00001,
root 0x199, subw 0x0, time 14595801, (950,266), root:(953,688),
state 0x4, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
А если натравить его на любое другое окно, то получаем опять лишние Release:
KeyRelease event, serial 13, synthetic NO, window 0xa00004,
root 0x199, subw 0x0, time 14653303, (-15,380), root:(922,624),
state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 13, synthetic NO, window 0xa00004,
root 0x199, subw 0x0, time 14653303, (-15,380), root:(922,624),
state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 16, synthetic NO, window 0xa00004,
root 0x199, subw 0x0, time 14653452, (-15,380), root:(922,624),
state 0x4, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 16, synthetic NO, window 0xa00004,
root 0x199, subw 0x0, time 14654457, (-15,380), root:(922,624),
state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 16, synthetic NO, window 0xa00004,
root 0x199, subw 0x0, time 14654457, (-15,380), root:(922,624),
state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 16, synthetic NO, window 0xa00004,
root 0x199, subw 0x0, time 14654597, (-15,380), root:(922,624),
state 0x4, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
Смущает synthetic NO. Значит источник лишних сообщений — сами иксы. Как такое возможно?