• 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
Grab keyboard focus?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Grab keyboard focus?


  • Subject: Grab keyboard focus?
  • From: Benjamin Donnachie <email@hidden>
  • Date: Sat, 20 May 2006 11:07:02 +0100
  • Openpgp: url=http://www.pythagoras.no-ip.org/~benjamin/benjamin.asc
  • Organization: Pythagoras Software (UK)

I'm new to Mac OS programming, so please bear with me! :-)

I am writing a small GUI helper application that is invoked by a unix
style daemon when input is required.  I need this application to pop up
on top of all other programs and grab the keyboard focus.

makeKeyAndOrderFront failed to bring the window to the front, and the
solution I found was to get the window level to NSModalPanelWindowLevel,
before invoking NSApp run (Or runModalForWindow:).  Unfortunately, the
keyboard focus remains with the previous application.

Is there anyway to force the keyboard focus to this application?  I've
tried Google and the Apple website, but I haven't managed to find
anything relevant.

Many thanks,

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: Grab keyboard focus?
      • From: Steve Checkoway <email@hidden>
  • Prev by Date: Problems centering window
  • Next by Date: Problems during file writing or During Type Casting ?
  • Previous by thread: Re: Problems centering window
  • Next by thread: Re: Grab keyboard focus?
  • Index(es):
    • Date
    • Thread