• 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
Getting a keystroke event to an NSTextView in another window.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting a keystroke event to an NSTextView in another window.


  • Subject: Getting a keystroke event to an NSTextView in another window.
  • From: Gideon King <email@hidden>
  • Date: Sat, 1 Jan 2011 00:24:08 +1000

I have a view which adheres to the NSTextInputClient protocol, and when people type into this view, I create another window with an NSTextView in it, which the user will continue typing into (this is necessary for some technical and user interaction reasons).

This all works absolutely fine in English, but when I try one of the languages that has a popup selection of characters, it doesn't work (e.g. select Pinyin simplified, and type "a").

I am picking up the event in my view when it calls setMarkedText:..., and creating my window, making it key and ordered front, and the text view the first responder.

I have tried everything I can think of to try to get the event to the other window in a way that will trigger the popup character window, but to no avail. I have tried, postEvent with the original event, or a copy of it with the editing view's window and context, either at the start or the end. I've tried sending keyDown:, sendEvent:, directly telling it to setMarkedText:, telling the input context to activate... just about all of those methods resulted in success for English, but none of them work for Chinese/Japanese etc with the panels.

Any suggestions about what else to try?


Thanks

Gideon




_______________________________________________

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: Getting a keystroke event to an NSTextView in another window.
      • From: Gideon King <email@hidden>
  • Prev by Date: UITableViewCell showsReorderControl does nothing
  • Next by Date: Re: Calculate next occurrence of a NSDate
  • Previous by thread: UITableViewCell showsReorderControl does nothing
  • Next by thread: Re: Getting a keystroke event to an NSTextView in another window.
  • Index(es):
    • Date
    • Thread