NSView -(void)keyDown in console program
Posted
by Jonas Byström
on Stack Overflow
See other posts from Stack Overflow
or by Jonas Byström
Published on 2010-04-15T06:34:33Z
Indexed on
2010/04/15
6:53 UTC
Read the original article
Hit count: 256
I'm not getting the -(void)keyDown callback on my inherited NSOpenGLView (note that mouseMoved does not work either though I do setAcceptsMouseMovedEvents:YES, but that is not an issue yet). It implements
- (BOOL)acceptsFirstResponder
{
return YES;
}
but still no luck. My knowledgeable friend implied that it might have something to do with that the application is still a console application and not a bundled .app (I'm currently porting it). If so: is there some way to circumvent? Could the cause be something else? When I terminate my console application, I frequently see all my keypresses go to stdout so it does seem reasonable...
© Stack Overflow or respective owner