On Feb 10, 2009, at 5:08 PM, Kevin Gessner wrote:
On Feb 9, 2009, at 11:47 PM, Gerd Knops wrote:
Assuming I have two identical USB keyboards (actually barcode
scanners) connected to a mac, is there any way to tell which of
them a keyboard event came from?
[snip]
Is there some way to, say, get a unique USB device ID or something
like that from an NSEvent or a EventRef?
I faced a similar problem a couple months ago, and didn't find any
way to correlate an NSEvent with a keyboard. My solution was to use
Dave Dribin's DDHidLib (http://www.dribin.org/dave/software/). I
listen for the low-level HID event, which is device-specific, then
wait for the next NSEvent to bubble up. It's a bit of housekeeping,
but it has been working well in practice.
Thanks for the pointer! I suspected I'd have to do something like that.
Gerd
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com