• 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: Capture spacebar
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Capture spacebar


  • Subject: Re: Capture spacebar
  • From: Trygve Inda <email@hidden>
  • Date: Wed, 18 Oct 2006 08:49:53 +0000
  • Thread-topic: Capture spacebar

> On 17 Oct 06, at 23:48, Trygve Inda wrote:
>> I have an iTunes-like app and would like to use the spacebar for
>> start/stop
>> but only if there is not an active text field or other control that
>> may need
>> the space bar to act normally.
>>
>> How can I achieve this?
>>
>> Also, is there anyway to put [space] in the menu item command key -
>> without
>> the command modifier?
>
> In order:
>
> Best solution I know of is to subclass NSApplication and catch it in -
> [NSApplication sendEvent:].
>
> Add "        space" to the title of the menu item. There is, in fact,
> no other way to display it - this is what iTunes does as well.

Will this ensure no other control wants the spacebar key since any text
fields etc. should catch it before getting to this point?

Thanks,

Trygve


 _______________________________________________
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: Capture spacebar
      • From: Andrew Farmer <email@hidden>
References: 
 >Re: Capture spacebar (From: Andrew Farmer <email@hidden>)

  • Prev by Date: Re: Capture spacebar
  • Next by Date: A class for Bin or Hex
  • Previous by thread: Re: Capture spacebar
  • Next by thread: Re: Capture spacebar
  • Index(es):
    • Date
    • Thread