• 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: keyDown: and Japanese input methods
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: keyDown: and Japanese input methods


  • Subject: Re: keyDown: and Japanese input methods
  • From: Satoshi Matsumoto <email@hidden>
  • Date: Wed, 15 Feb 2006 08:43:55 +0900
  • Thread-topic: keyDown: and Japanese input methods

on 06.02.15 8:32 AM, Mark Alldritt at email@hidden wrote:
> In my NSTextView sub-class I override keyDown: to intercept the \n and \r
> characters which have a special meaning for my application.  The problem is
> that my handling of these return characters is interfering with Japanese
> Input methods which rely on the return character to conclude certain editing
> operations.
>
> How do I determine when an input method is in the middle of entering a
> sequence of Japanese characters and when its not?

You can know it with following NSInputManager protocol:

hasMarkedText
Returns YES if the receiver has marked text, NO if it doesn’t.

- (BOOL)hasMarkedText

Discussion
Unlike other methods in this protocol, this one is not called by an input
server. The text view itself may call this method to determine whether there
currently is marked text. NSTextView, for example, disables the Edit>Copy
menu item when this method returns YES.

Satoshi
-----------------------------------------------------
Satoshi Matsumoto <email@hidden>
816-5 Odake, Odawara, Kanagawa, Japan 256-0802


 _______________________________________________
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

References: 
 >keyDown: and Japanese input methods (From: Mark Alldritt <email@hidden>)

  • Prev by Date: keyDown: and Japanese input methods
  • Next by Date: Re: keyDown: and Japanese input methods
  • Previous by thread: keyDown: and Japanese input methods
  • Next by thread: Re: keyDown: and Japanese input methods
  • Index(es):
    • Date
    • Thread