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

Re: Multilanguage support


  • Subject: Re: Multilanguage support
  • From: Clark Cox <email@hidden>
  • Date: Fri, 4 Jun 2004 08:38:28 -0400

On Jun 04, 2004, at 03:09, Massimiliano Mazzeschi@Home wrote:

> Hi!
> I've a Cocoa based application and I'd like to support multilanguage.
> I known that the type member of the NSEvent is NSKey for ''normal''
> keyboard keys,
> and this already work, so I tried to dump what happened when Japanes
> keys are
> pressed (using the Multilanguage Panel). Not NSKey are issued, but
> only
> NSSystemDefined. I've checked on the web, but I can't find anything
> that can help me to
> decode the information.
> If I send Japanes to a terminal it shows the UTF-8 codes (base 8) of
> the char.
> What I'd like to known in my application is the UTF-8 form of the
> char.
> Anyone can help me ?
> Is there any other way to intercept the multilanguage sequences ?

Sure, in whichever object is your first responder (i.e. the control or
view that is receiving the text input), implement:

- (void)insertText:(NSString*)insertString;

The string passed in as the parameter is the result *after* any input
methods have parsed the raw key input. For this reason, as you have
discovered, it is usually a bad idea to deal with raw key events.


--
Clark S. Cox III
email@hidden
http://homepage.mac.com/clarkcox3/
http://homepage.mac.com/clarkcox3/blog/B1196589870/index.html

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Multilanguage support (From: "Massimiliano Mazzeschi@Home" <email@hidden>)

  • Prev by Date: Getting event details in action: selector
  • Next by Date: Re: Representing UTC time in a readable format
  • Previous by thread: Multilanguage support
  • Next by thread: Re: Multilanguage support
  • Index(es):
    • Date
    • Thread