I am trying to capture linux keyboard/mouse input, and I am reading events from like /dev/input/event2. But it seems the input are sometimes directed to /dev/
/dev/input/event2
/dev/
To find out, go to /dev/input/by-id or /dev/input/by-path and do a ls -l to find out which symlink points to which event<*>.
/dev/input/by-id
/dev/input/by-path
ls -l
event<*>
Also, I thought it would be helpful for all those who come across this page to find this helpful link to some code which captures keyboard events.