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

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -