I'm working on mouse autodetection.
Detection of the USB mouse is fine.
I was doing some research on how to detect a PS/2 mouse, came across a little
bit of information that the PS/2 mouse always uses interrupt 12.
The interrupt assignments are shown /proc/interrupts, that you can open with
a text editor.
True enough, when using my PS/2 mouse, I see this line in /proc/interrupts:
Code: Select all
12: 2833 XT-PIC PS/2 Mouse
Code: Select all
12: 0 XT-PIC SiS 7012
Question 1
But, I need to know that this behaviour is consistent on other PCs.
If you are using a PS/2 mouse, do you get that text string "PS/2 Mouse"
alongside the interrupt 12 line?
If you are using a USB or serial mouse, do you not get that string?
Question 2
What order should mouses be detected?
Should I check for a USB mouse first, as many people will have an external
USB mouse on their laptop and they will want it to override the internal
one?
If there is no USB mouse, then I'll check for PS/2 mouse, failing that, could
just assume it's serial ...as I don't yet have a surefire serial detection method.