• 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
Re: How do you use the space key as a key equivalent
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do you use the space key as a key equivalent


  • Subject: Re: How do you use the space key as a key equivalent
  • From: Edward Hillenbrand <email@hidden>
  • Date: Sat, 5 Feb 2005 13:09:34 -0700

On Feb 5, 2005, at 12:52 PM, Michael Swan wrote:

Just wondering if anyone knows how to use the space bar in key equivalents, like iTunes for pause and play. I tried to type it into the key equivalent field (didn't work) and it is not in the popup menu either. Is this a private Apple trick that they don't share or just poorly documented.

You have to fake it.

Subclass NSWindow and override -keyDown;, you could also subclass NSApplication if you need it to work globally in you app.

Then in IB edit your menu item's title so it is something like "Play space". Inset enough spaces between play and space so it looks good and doesn't look like part of the menu title.

Now I know what you are thinking, "this can't be right." Well, open up MenuBar.nib in the DVD Player bundle and you will see it for yourself.

-- Edward Hillenbrand

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: How do you use the space key as a key equivalent
      • From: Mike Morton <email@hidden>
    • Re: How do you use the space key as a key equivalent
      • From: daniel <email@hidden>
References: 
 >How do you use the space key as a key equivalent (From: Michael Swan <email@hidden>)

  • Prev by Date: Re: checking if an object's instance exists.
  • Next by Date: Re: checking if an object's instance exists.
  • Previous by thread: How do you use the space key as a key equivalent
  • Next by thread: Re: How do you use the space key as a key equivalent
  • Index(es):
    • Date
    • Thread