Maybe this is a general question:
How can I know which device files under the "/dev" directory are corresponded to my pc's mouse and keyboard?
Maybe this is a general question:
How can I know which device files under the "/dev" directory are corresponded to my pc's mouse and keyboard?
Depends on a lot of things (architecture, distribution, age of kernel, phase of the moon), but the most likely answer is
/dev/input/mouse*
is each mouse on the sysem,/dev/input/mice
is the aggregation of all mice, and/dev/input/uinput
is the keyboard.The answer these days is "Ask HAL or DeviceKit". Their job is to answer the question "Where can I find a mouse?"
I am not sure how new this is to udev or devfs (if using older kernel), or if it requires certain kernel compilation options, but with the Ubuntu Jaunty stock kernel you can do the following for the keyboard:
Then notice where the symbolic link is point to on the left. For verification, you can do something like:
Then type stuff in another window while that is running and you should see all sorts of characters filling the terminal.
You can do the same with the mouse# until you see more junk when moving the mouse, like:
There are probably better ways, but they are probably not as fun:-)