• 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
Simulating key presses and mouse movements
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Simulating key presses and mouse movements


  • Subject: Simulating key presses and mouse movements
  • From: Fred Norbett <email@hidden>
  • Date: Tue, 10 Dec 2002 03:45:17 -0800 (PST)

Working on a little controller program here that you
can log into via ssh and prod to do stuff But I was
wondering - what's the best way to generate key
presses and mouse movements/mouse events?

One of the ways for keyboard appears to be setting the
app up as an NSInputServer, but even that looks a
little problematic... to a newbie to OS X programming,
how does one pass events to a specific app or just the
frontmost app?

The other thing is that NSInputServer doesn't appear
to deal with mouse events. If anyone could point me to
some decent source code, I would be very happy;
failing that, some good IOKit documentation, as that
seems to be the route to take. I checked Apple's site,
but there's surprisingly little on IOKit; and as for
generating text events, 'under construction'...

Thanks

Fred
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
_______________________________________________
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.

  • Prev by Date: Re: Subclassing NSWindowController
  • Next by Date: Re: how do I get the "key" sub view of a window?
  • Previous by thread: Re: Difference between Main and Key attribute for a window
  • Next by thread: Help me please to find a job in Cocoa
  • Index(es):
    • Date
    • Thread