Quote:
Originally Posted by hawhill
...
Quite right, but, err, *cough*, you can just open every input device that comes across. In most cases, that is. You get input events, and frankly probably don't care if that's from the touchscreen or an USB digitizer tablet that some mad-minded hacker managed to connect to the kindle...
...
|
But is it safe to
ASSUME that device event codes will be "globally unique" across devices, so we can pool our device events and process them in a generic event handler?
(...or, did I misinterpret where you were going with this?)
Although we may WANT to process all device events (including the "headphone insertion and removal" events at the "headphone jack" device), I do not believe that it is a safe to assume that we can identify an event as coming from a device without knowing WHICH device that event came from.
Here is what I mean about the "correct" way to find a device with the properties we want:
http://www.linuxjournal.com/article/6429?page=0,1