zeth / inputs

Cross-platform Python support for keyboards, mice and gamepads
BSD 3-Clause "New" or "Revised" License
269 stars 87 forks source link

Several Key Events Trigger 4 Times on one press and release #67

Open frastlin opened 5 years ago

frastlin commented 5 years ago

Hello, The following keys trigger 4 times every press: backspace delete home end pageup pagedown left right up down

Here are the 4 events from delete:

{'device': inputs.Keyboard("/dev/input/by-id/usb-A_Nice_Keyboard-event-kbd"), 'timestamp': 1545442140.441741, 'code': 'KEY_DELETE', 'state': 1, 'ev_type': 'Key'}

{'device': inputs.Keyboard("/dev/input/by-id/usb-A_Nice_Keyboard-event-kbd"), 'timestamp': 1545442140.458181, 'code': 'KEY_DELETE', 'state': 1, 'ev_type': 'Key'}

{'device': inputs.Keyboard("/dev/input/by-id/usb-A_Nice_Keyboard-event-kbd"), 'timestamp': 1545442140.459182, 'code': 'KEY_DELETE', 'state': 0, 'ev_type': 'Key'}

{'device': inputs.Keyboard("/dev/input/by-id/usb-A_Nice_Keyboard-event-kbd"), 'timestamp': 1545442140.595211, 'code': 'KEY_DELETE', 'state': 0, 'ev_type': 'Key'}

Notice that the middle events are almost at the same time. None of the other keys do this, just the above keys I mentioned.