My 20 month old daughter loves to bang on the keys of the keyboard. I made
a simple cocos2d app that shows random animal pictures (with noises) when
she presses keys. (This has proved very popular with her and she now can
identify all of the animals!)

Anyhow, she'll sit on my lap and bang the keyboard for 4-5 minutes at a
time. The problem is that she very often hits command-space and then other
keys, causing the app to exit full screen and Spotlight to activate. From
time to time, she does other things, such as hiding the dock (in the
background), switching spaces, etc.

Is there a way for me to disable some of these system-level keyboard
commands when the app that I made  has focus? I came across some old
Carbon, namely:

void *oldHotKeyMode = PushSymbolicHotKeyMode(kHIHotKeyModeAllDisabled);
...
PopSymbolicHotKeyMode(oldHotKeyMode);

but I run into compiler errors when I try to use these:

ld: symbol(s) not found for architecture x86_64

I'm using Xcode 4.5 and would like to continue using ARC if possible (since
GC is depreciated).

Any ideas?
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to