• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
"Capturing" a keyboard-like device in a Cocoa application?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"Capturing" a keyboard-like device in a Cocoa application?


  • Subject: "Capturing" a keyboard-like device in a Cocoa application?
  • From: Chris Hanson <email@hidden>
  • Date: Tue, 15 Apr 2003 13:20:41 -0500

I'm working on a Cocoa desktop application that's Jaguar-only. I'm running into an issue I think the HID Manager might be able to help me with. I'm not sure though, so I'd like to get some input from the community.

In my application, there's a window for user input where the user can type information in a variety of fields. Some users may also use an alternative USB input device that emulates a keyboard to enter information. However, I need to treat input from this alternative input device specially, and populate particular fields with the input the device sends.

Specifically: The device sends normal "keystrokes" for user input, and ends its input with return keystrokes. Some of the keystrokes it sends should go in some fields, some in other fields, and the returns it sends should *not* activate the window's default button. But whenever the user types on an actual keyboard, the input should go into the field that has the input focus, just like normal, and when the user presses return or enter on an actual keyboard it should activate the window's default button, just like normal.

The alternative input devices will all be the same model from the same manufacturer, so I can hard-code the USB vendor and product ID into my application if necessary.

Will it be both possible and straightforward to use HID Manager to somehow "capture" this alternative input device and process its input specially, and therefore have its input *not* routed through the Cocoa input mechanism?

Or is there some other technology or mechanism I can use to accomplish my goal?

-- Chris

--
Chris Hanson, bDistributed.com, Inc. | Email: email@hidden
Custom Application Development | Phone: +1-847-372-3955
http://bdistributed.com/ | Fax: +1-847-589-3738
http://bdistributed.com/Articles/ | Personal Email: email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: "Capturing" a keyboard-like device in a Cocoa application?
      • From: Kyle Moffett <email@hidden>
  • Prev by Date: Re: Newbie: Current Apps Directory
  • Next by Date: Re: Newbie: Current Apps Directory
  • Previous by thread: Re: Newbie: Current Apps Directory
  • Next by thread: Re: "Capturing" a keyboard-like device in a Cocoa application?
  • Index(es):
    • Date
    • Thread