• 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
Re: Keyboard Input
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Keyboard Input


  • Subject: Re: Keyboard Input
  • From: Peter Ammon <email@hidden>
  • Date: Mon, 02 Jul 2001 09:43:08 -0700

on 6/30/01 5:55 PM, David Rogers at email@hidden wrote:

> How would I trap keyboard input? I need to get input to control a GL game.
>

If your game is intended to be full screen and you are content with using an
NSRunLoop, subclass NSApplication (how to do that right is discussed in the
NSApplication docs) and override sendEvent:.

If you're just displaying in an NSOpenGLView, subclass the containing
NSWindow and override keyDown:

Hope this helps.

-Peter


  • Prev by Date: Re: NSBundle
  • Next by Date: Re: Initializing a string with an NSData
  • Previous by thread: Re: object ownership question
  • Next by thread: Re: Initializing a string with an NSData
  • Index(es):
    • Date
    • Thread