Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HID device trapping



Hi Dave,

My turn to help you out.

:)

I am not a USB programmer either but have made quite a lot of use of the HID Manager. But even there I would not call myself an expert so others may want to correct what I say below.

- How to get started?

Use the HID Utilities sample <http://developer.apple.com/samplecode/Sample_Code/Devices_and_Hardware/HID_Manager/HID_Utilities_Source.htm> to get started.

I've got sample. The HID Explorer app is very useful. But it can hardly react to the reader. If I set there i.e. key 7 it reacts only in few of the cases I try to scan the code. Perhaps it's too fast.


- What to read to know all the terms?

I actually managed to get along pretty well with just that sample code as it does all the hard stuff for you.

Wow! I have no idea what the values HID Explorer are so I'd like to read some books first.


 - Is possible to capture all the keystrokes produced by that HID device that
   should go that the app my code is loaded in?

Starting in Panther you can capture a device with the HID manager so it will not be available to other apps or even the system. You will need to use kIOHIDOptionsTypeSeizeDevice (see the Panther headers for more info) and modify the sample code accordingly.

Unfortunately the app has to run 10.2 or later :(. I'll try what happens if I capture the external keyboard. If I get all they keystrokes only myself or not.


- What would be the recommended steps for doing such app.

Build a basic app using the HID Utilties sample and take it from there.

OK.

- I believe this can be done without the kernel level code or am I wrong?

No need for going into the Kernel unless you want to capture the device on pre-Panther systems.


And about the forwarding of the events, try AppleEvents ;-)

:) there'll be no need for forwarding events but it had to be really fast do I'd use CFMach* or mach_msg stuff for that. I've spoke about that with Steve Zellers.


Thanks,

  Tomas
--
Ing. Tomas Zahradnicky, Jr.
Production Manager, 24U Software
Associate Member, Filemaker Solutions Alliance
mailto:email@hidden
http://www.24uSoftware.com
_______________________________________________
usb mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/usb
Do not post admin requests to the list. They will be ignored.

References: 
 >HID device trapping (From: Tomas Zahradnicky <email@hidden>)
 >Re: HID device trapping (From: David Niemeijer <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.