Block multiple keypress events that has same timestamp
2
votes
1
answer
164
views
I have a faulty keyboard that will fire additional keys when i press a single key.
for example,
when i click letter "D" on keyboard it will send "D5"
$xev -event keyboard
KeyPress event, serial 28, synthetic NO, window 0x3c00001,
root 0x929, subw 0x0, time 7185644, (351,334), root:(2087,693),
state 0x10, keycode 40 (keysym 0x64, d), same_screen YES,
XLookupString gives 1 bytes: (64) "d"
XmbLookupString gives 1 bytes: (64) "d"
XFilterEvent returns: False
KeyPress event, serial 28, synthetic NO, window 0x3c00001,
root 0x929, subw 0x0, time 7185644, (351,334), root:(2087,693),
state 0x10, keycode 84 (keysym 0xffb5, KP_5), same_screen YES,
XLookupString gives 1 bytes: (35) "5"
XmbLookupString gives 1 bytes: (35) "5"
XFilterEvent returns: False
KeyRelease event, serial 28, synthetic NO, window 0x3c00001,
root 0x929, subw 0x0, time 7185716, (351,334), root:(2087,693),
state 0x10, keycode 40 (keysym 0x64, d), same_screen YES,
XLookupString gives 1 bytes: (64) "d"
XFilterEvent returns: False
KeyRelease event, serial 28, synthetic NO, window 0x3c00001,
root 0x929, subw 0x0, time 7185716, (351,334), root:(2087,693),
state 0x10, keycode 84 (keysym 0xffb5, KP_5), same_screen YES,
XLookupString gives 1 bytes: (35) "5"
XFilterEvent returns: False
notice that both keypress events have the same timestamp.
my question is,
is there a way to block the second keyPress event if it has the same timestamp as the previous keyPress event?
or is there any other way to block this second input?
Asked by shashi srinath
(21 rep)
Aug 22, 2022, 06:49 PM
Last activity: Aug 23, 2022, 09:40 AM
Last activity: Aug 23, 2022, 09:40 AM