• 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
Problem receiving key events in CLI created window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem receiving key events in CLI created window


  • Subject: Problem receiving key events in CLI created window
  • From: Pete French <email@hidden>
  • Date: Thu, 17 Jul 2003 13:40:05 +0100

O.K., I have a very frustrating problem with a piece of long
standing code which has stopped working on the latest version
of OSX. The code worked fine on the public beta (last version I
had before Jaguar) and also on Rhapsody and OpenStep before that.

Which is kind of frustrating.

I have acommandline program which, when run, opens a window and draws into
it. It also receives events in that window using this:

event = [NSApp nextEventMatchingMask:NSAnyEventMask
untilDate:the_past inMode:NSDefaultRunLoopMode dequeue:YES];

where 'the_past' is set to [NSDate distantPast] so that the call returns
immediately. For key events I process them myself, all other events are
then passed on using [NSApp sendEvent:event];

When I run the program I find that key events are still captured by the
terminal! Even with the window key and to the front, if I type then
the keypresses appear in the shell window the application is running from.

I am completely at a loss as to how to fix this, or what has changed to make
this suddenly stop working after five years!

All suggestions are very welcome...

-bat.
_______________________________________________
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: Problem receiving key events in CLI created window
      • From: Dustin Voss <email@hidden>
  • Prev by Date: Re: NSLogging a memory address
  • Next by Date: Re: cocoa/Obj-C API for iCal
  • Previous by thread: Re: cocoa/Obj-C API for iCal -> Feature request posted
  • Next by thread: Re: Problem receiving key events in CLI created window
  • Index(es):
    • Date
    • Thread