Skip navigation.
 
mlRe: Detecting Double Byte Input
FROM : John Pattenden
DATE : Wed Apr 13 02:38:52 2005

Actually, now that I think a little harder, I would very much like to
know before the textview has marked text in it.

On my computer if I command-space it toggles between Japanese and US
character modes (if that's that right description)  If I am in US the
text goes directly in, if I am in Japanese it goes into Marked text
mode. What I need to do, is to determine when a keyDown event occurs
(the first one for an entry is sufficient) if the character I am
getting is a single byte character - and this directly entered - or a
the first byte of multibyte character. In the case of multibyte entry -
or markedText - I need to send the input somewhere else. This is a
problem related to using Carbon / NSQuickDrawView inside Cocoa.

The text system seems to know it is in marked text mode - since if I am
in Japanese mode as soon as I enter a character the underlined text
behavior starts.

John Pattenden


>
> if ([myTextView hasMarkedText]) ...
>
> For more information, see my recent posts to this list on "how input
> method editors work":
>
> "You should also be aware that in some cases the text view will
> contain and display text that is only tentative, not yet confirmed by
> the user.  You can find out whether this is the case by calling
> -hasMarkedText, and you can determine where it is using
> -markedRange...."
>
> Douglas Davidson
>

Related mailsAuthorDate
mlDetecting Double Byte Input John Pattenden Apr 12, 22:10
mlDetecting Double Byte Input John Pattenden Apr 13, 00:41
mlRe: Detecting Double Byte Input glenn andreas Apr 13, 00:57
mlRe: Detecting Double Byte Input John Pattenden Apr 13, 01:26
mlRe: Detecting Double Byte Input Douglas Davidson Apr 13, 01:32
mlRe: Detecting Double Byte Input John Stiles Apr 13, 01:36
mlRe: Detecting Double Byte Input John Pattenden Apr 13, 02:00
mlRe: Detecting Double Byte Input John Pattenden Apr 13, 02:38
mlRe: Detecting Double Byte Input Ben Kennedy Apr 13, 02:42
mlRe: Detecting Double Byte Input John Stiles Apr 13, 02:45
mlRe: Detecting Double Byte Input Aki Inoue Apr 13, 07:23
mlRe: Detecting Double Byte Input Aki Inoue Apr 13, 07:27