• 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: Help with text input
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with text input


  • Subject: Re: Help with text input
  • From: Bill Appleton <email@hidden>
  • Date: Fri, 30 Apr 2010 07:12:08 -0700

hi all,

thanks for the help

the characters message gives me the unicode output, that is working fine

but i am unsure how to detect raw keys, like arrow keys, function keys, etc

in carbon/event manager there was charCodeMask and keyCodeMask which
determined this stuff

what is the best way on cocoa to determin raw key (physical key) input?



thanks,

bill appleton






On Thu, Apr 29, 2010 at 5:47 PM, Douglas Davidson <email@hidden>wrote:

>
> On Apr 29, 2010, at 5:26 PM, Charles Srstka wrote:
>
> > On Apr 29, 2010, at 5:38 PM, Jens Alfke wrote:
> >
>



> >>      event.isARepeat;
> >> }
> >
> > I don’t think that will do the special characters that you can type via
> the Option key. What you want to do is to make your text view conform to the
> NSTextInputClient protocol, which is documented here:
> >
> >
> http://developer.apple.com/mac/library/documentation/cocoa/reference/NSTextInputClient_Protocol/Reference/Reference.html
> >
> > This will give you not only the option key, but also make all the
> standard Mac OS text editing shortcuts work, as well as any custom key
> bindings the user has defined. It’s pretty nifty, and will make your users
> like your app a lot better.
>
> Simple keyDown: handling might do for cases where you're just interested in
> keystrokes as individual events--for example, if you were using arrow keys
> to move something in your UI.  If you're really taking textual input, you're
> going to want the full input protocols; that's how you're going to get not
> only dead key support but also input from arbitrary sources such as input
> methods.  The easiest way to do this is to make use of an existing class
> that implements them, such as NSTextView--that's how the standard Cocoa
> controls do it--but it's always open to you to implement them yourself if
> necessary.
>
> Douglas Davidson
>
> _______________________________________________
>
> 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
>
_______________________________________________

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: Help with text input
      • From: Shawn Erickson <email@hidden>
    • Re: Help with text input
      • From: Graham Cox <email@hidden>
References: 
 >Help with text input (From: Bill Appleton <email@hidden>)
 >Re: Help with text input (From: Jens Alfke <email@hidden>)
 >Re: Help with text input (From: Charles Srstka <email@hidden>)
 >Re: Help with text input (From: Douglas Davidson <email@hidden>)

  • Prev by Date: Design pattern for collection of items and many subsets
  • Next by Date: Re: Help with text input
  • Previous by thread: Re: Help with text input
  • Next by thread: Re: Help with text input
  • Index(es):
    • Date
    • Thread