• 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
Emulating modifier keys
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Emulating modifier keys


  • Subject: Emulating modifier keys
  • From: Daniel Tapie <email@hidden>
  • Date: Fri, 23 Feb 2007 18:35:25 +0100

Hi there,

One of our customers wants to use an external keyboard (XKeys) to simulate certain modifier keys like CTRL, CMD etc...

So, I tried overriding "sendEvent" in my application and my idea was to modify the "modifiers" property of the NSEvent I receive.
However, there are no accessors to do this, so it seems I have to re- create new events by copying the fields of the existing event (using methods like "mouseEventWithType:..."). Of course, I am using different methods depending of the type of event sendEvent receives.
Then, I call [super sendEven:myNewEvent] to pass the "modified" event to the normal chain of responders.


The problem is that it seems some views like the QTMovieViews do not react to my newly formed events (mouseDown events for instance) and completely ignore them. If, instead of creating a new event, I make a copy of the existing one, then everything is ok but of course, I cannot change the modifiers.

So, I have two questions:

1) Is there a way to modify "in place" an existing NSEvent?
2) Is there another way to emulate modifier keys?

Thanks for any clues or pointers anybody might have!



Daniel Tapie

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Emulating modifier keys
      • From: Daniel Tapie <email@hidden>
  • Prev by Date: Re: NSXMLParser in background thread crashing
  • Next by Date: Re: NSTableView with LARGE dataset
  • Previous by thread: Re: NSTableView with LARGE dataset
  • Next by thread: Re: Emulating modifier keys
  • Index(es):
    • Date
    • Thread