• 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: CGEventKeyboardGetUnicodeString + modifier key
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CGEventKeyboardGetUnicodeString + modifier key


  • Subject: Re: CGEventKeyboardGetUnicodeString + modifier key
  • From: Eric Schlegel <email@hidden>
  • Date: Sun, 15 Apr 2007 20:27:05 -0700


On Apr 15, 2007, at 12:36 PM, email@hidden wrote:

UCKeyTranslate() seems to work fine for a single key, but what about a two-key operation, something like option-u u to produce ΓΌ?

UCKeyTranslate keeps track of the dead key state (a dead key is option- u, for example, which doesn't produce a character code until you type something else to complete the key combination) in the deadKeyState output parameter. You should keep a global variable for the dead key state and pass a pointer to that same variable on each call, and that will allow UCKeyTranslate to track the dead key state from one invocation to the next.


Note that this approach still isn't going to work for input that passes through a more complex input method such as Kotoeri for Japanese input, but maybe that's OK for your target market.

-eric

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: CGEventKeyboardGetUnicodeString + modifier key
      • From: Bill <email@hidden>
References: 
 >Re: CGEventKeyboardGetUnicodeString + modifier key (From: email@hidden)

  • Prev by Date: display NSXMLDocument with NSOutlineView and NSTreeController
  • Next by Date: Re: taking control of the Window menu
  • Previous by thread: Re: CGEventKeyboardGetUnicodeString + modifier key
  • Next by thread: Re: CGEventKeyboardGetUnicodeString + modifier key
  • Index(es):
    • Date
    • Thread