Re: Keyboard Input
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