• 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
Toddler-proofing an app (disabling spotlight keyboard shortcut)?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Toddler-proofing an app (disabling spotlight keyboard shortcut)?


  • Subject: Toddler-proofing an app (disabling spotlight keyboard shortcut)?
  • From: Clay Heaton <email@hidden>
  • Date: Fri, 21 Sep 2012 10:39:43 -0400

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 (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Toddler-proofing an app (disabling spotlight keyboard shortcut)?
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Share NSView between processes
  • Next by Date: Re: iOS:targeting iOS3 through iOS6
  • Previous by thread: Re: Share NSView between processes
  • Next by thread: Re: Toddler-proofing an app (disabling spotlight keyboard shortcut)?
  • Index(es):
    • Date
    • Thread