Capturing key events from macos terminal app?

Hi. I know this is an old topic but came across the same problem in current 0.9.2dev.
Due to my preference of working in CLion rather than XCode, I was facing the same problem. In this example https://github.com/gamedevtech/CocoaOpenGLWindow I saw the keyboard loop working fine, so without the required Cocoa knowledge just tried to figure out what was the difference. I can confirm that I got the keyboard handling working correctly after adding the line below into AppImplMac.mm init():

// Since Snow Leopard, programs without application bundles and Info.plist files don't get a menubar 
// and can't be brought to the front unless the presentation option is changed
[NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];

I’m not familiar enough with Cinder or Cocoa for that matter to do any git proposals, but if someone in the know this is the right thing to commit, please do.
Another nuisance was that without the application bundle the focus stays back on the terminal as per https://stackoverflow.com/questions/5032203/can-a-cocoa-apps-executable-steal-focus-from-caller .
I used the proposed solution and added a second line to the snippet above:

[[NSApplication sharedApplication] activateIgnoringOtherApps:YES];

and can confirm that Cocoa window now comes up. Again, if someone could confirm this would be a right thing to do, would be nice to have it in original distribution.

Thanks

1 Like