• 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: Forcing a text input method on a NSTextField
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Forcing a text input method on a NSTextField


  • Subject: Re: Forcing a text input method on a NSTextField
  • From: Dimitri Bouniol <email@hidden>
  • Date: Tue, 8 Apr 2008 15:13:31 -0700

The cocoa method seems to only work if the input method was previously enabled by the user.

For the carbon method, do I get the current one with TISCopyCurrentKeyboardLayoutInputSource, set the new one (Kotoeri Katakana) with TISSetInputMethodKeyboardLayoutOverride, then re-set the old one with TISCopyCurrentKeyboardLayoutInputSource? (following first responder status of the text field)
If thats the case, how would I get a reference to the new one? The only function that I noticed is TISCreateInputSourceList, but what properties would I pass to it?
Sorry for all the questions... I'm a bit unfamiliar with Carbon.


On Apr 8, 2008, at 12:20 PM, Aki Inoue wrote:

Right now, there is no way to specify Japanese "Hiragana" just using Cocoa API.

Starting from Leopard, you can use -[NSTextFieldCell setAllowedInputSourceLocales:] with an array containing @"ja" (the Japanese locale) to narrow it to Japanese input modes.

Or, also from Leopard, you can use TextInputSource API in Carbon framework to fine control the input source.

Aki

On 2008/04/08, at 11:59, Dimitri Bouniol wrote:

I would like to force a text input method, such as the Japanese hiragana input, onto a NSTextField programatically. How would I go about doing this?


-- 定魅刀利 Dimitri Bouniol email@hidden http://web.mac.com/dimitri008/



_______________________________________________

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


References: 
 >Forcing a text input method on a NSTextField (From: Dimitri Bouniol <email@hidden>)
 >Re: Forcing a text input method on a NSTextField (From: Aki Inoue <email@hidden>)

  • Prev by Date: Re: missing (some) window names in Window menu
  • Next by Date: Re: PDFView and Core Data undos
  • Previous by thread: Re: Forcing a text input method on a NSTextField
  • Next by thread: NSTextField height in Interface Builder
  • Index(es):
    • Date
    • Thread