• 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
CGPostKeyboardEvent strangeness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CGPostKeyboardEvent strangeness


  • Subject: CGPostKeyboardEvent strangeness
  • From: Salánki Benjámin <email@hidden>
  • Date: Thu, 11 Nov 2004 13:56:13 +0100

Hi all!

I have hotkey support in my app using the carbon hotkey APIs, which work like a charm. I want to call a method when a given hotkey combo is pressed, which works as well.

I have a method that uses CGPostKeyboardEvent functions to post virtual keydown events which works great as well.

The problem arises when I try to mix these two functions, so when I press my hotkey combo I want to use the CGPostKeyboardEvent functions. But here's what happens: I press my key combo and everything works fine. I press it again, and nothing happens!! I press it a third time, works like a charm, press it a fourth time, nothing again, and so on!!!

I tried to NSLog() all the way and it looks like that the hotkey doesn't even get recognized every other time I try to press the combo. When I comment out the CGPostKeyboardEvent functions the hotkey gets recognized just fine.

Any ideas? I need the CGPostKeyboardEvent functions bad!!!


:)

thx,
ben
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: CGPostKeyboardEvent strangeness
      • From: David Niemeijer <email@hidden>
  • Prev by Date: Re: Multiple Nibs
  • Next by Date: Enabling click-through
  • Previous by thread: Re: Advice for cross-platform equivalent of NSFileWrapper
  • Next by thread: Re: CGPostKeyboardEvent strangeness
  • Index(es):
    • Date
    • Thread