linux - Xlib xinput test device status if it got hanged -
how check if keyboard (for examle) not hanged?
maybe possible send device , check response using pselect()?
i'm using xinput extensions (1,2) provide facility such task?
i looking this. can responding keyboards id running in bash.
kbname=$(cat /proc/bus/input/devices | grep -poi '(?<=n:\sname=")(.*keyboard.*)(?="$)') && xinput list | grep -poi '(?<='$kbname')(?:\s+id=\k)(\d+)'
Comments
Post a Comment