Re: Inserting localized text to NSTextView
Re: Inserting localized text to NSTextView
- Subject: Re: Inserting localized text to NSTextView
- From: email@hidden
- Date: Wed, 18 Apr 2007 12:00:58 -0700
That makes sense for double-byte (?) languages such as Japanese, but what about languages that don't use a cheatsheet window or are not interactive? If I can have it work only for Eurporean languages, I'd be happy.
Thanks.
On Wednesday, April 18, 2007, at 11:42AM, "John Stiles" <email@hidden> wrote:
>AFAICS there isn't a good way to turn keystrokes from an event tap into
>the actual text typed.
>The issue here is that most some input methods are
>graphical/interactive, e.g. they can pop up a cheatsheet of alternatives
>and the user selects from the list by either typing or clicking. So you
>might see the following events
>
>keystroke n
>keystroke i
>keystroke h
>keystroke o
>keystroke n
>keystroke n
>keystroke g
>keystroke o
>keystroke space <-- at this point a cheatsheet window appears on top of
>the NSTextView
>mouse click on the cheatsheet window
>
>And all those events turn into three characters, ???. I don't see a good
>way to get from point A to point B.
>
>
>email@hidden wrote:
>
>>I am using an event tap function for my app. Whatever the user types, I insert onto a text view. If, for example, the user types 'a' onto a TextEdit window when using Hebrew, a Hebrew representation of 'a' appears on the TextEdit window. My tap function gets the 'a' and inserts it onto its own text view. However, it doesn't insert the Hebrew representation, instead it inserts 'a'. I'd like to have my app insert the Hebrew representation of 'a'' onto its text view also. But I don't know how to do it. Thanks!
>>
>>
>>On Wednesday, April 18, 2007, at 11:24AM, "John Stiles" <email@hidden> wrote:
>>
>>
>>>This is more complicated than you think? have you ever looked at the
>>>Japanese and Chinese input types?
>>>You can simulate keyboard presses at a very low level if necessary,
>>>but are you 100% sure that this is what you want? What is your app
>>>doing exactly?
>>>
>>>
>>>On Apr 18, 2007, at 11:17 AM, email@hidden wrote:
>>>
>>>
>>>
>>>>I have an app with a NSTextView. If, for example, the user selects
>>>>Hebrew in the system preference International panel Input Menu,
>>>>typing abcd onto the text view produces Hebrew. However, if I
>>>>programatically insert abcd using [textView insertText:@"abcd"]
>>>>then English, not Hebrew appears in the text view. How can I
>>>>programatically insert text onto a text view so that it appears
>>>>just as the user typed the text? Thanks.
>>>>_______________________________________________
>>>>
>>>>
>>>>
>>
>>
>>
>
_______________________________________________
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