Re: Getting a keystroke event to an NSTextView in another window.
Re: Getting a keystroke event to an NSTextView in another window.
- Subject: Re: Getting a keystroke event to an NSTextView in another window.
- From: Gideon King <email@hidden>
- Date: Sat, 1 Jan 2011 11:38:57 +1000
Never mind - found another way of handling it by implementing the marked text methods directly in my view and only creating the other window when the character composition is complete. Problem solved.
On 01/01/2011, at 12:24 AM, Gideon King wrote:
> 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.
>
_______________________________________________
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