[squeak-dev] Re: Linux input testers needed
Michal Perutka
michal.perutka at gmail.com
Thu Aug 27 20:24:57 UTC 2009
Hi,
2009/8/27 Andreas Raab <andreas.raab at gmx.de>
> Michal Perutka wrote:
>
>> many thanks. I have tried your code (sorry for the delay - I spent two
>> weeks with my family but without my laptop ;) and it works for me (hurray!
>> :-) with these modifications:
>>
>
> Very good.
>
> /Character value: .../ (or /keyValue asCharacter/ in your version of the
>> next method) doesn't work for characters with unicodes > 255 (e.g. "latin
>> small letter s with caron" $š has unicode 353).
>>
>
> Actually, that was no mistake. I meant to use Character value: xxx since I
> want us to get away from the leading char stuff in Unicode. What happens
> when you use Character value: instead of Unicode value:? Does it blow up?
> Does it display incorrectly? Anything else?
$? for every code > 255. For example Character value: 353 shows $?,
Character leadingChar: 14 code: 353 shows $š
>
>
> UnicodeInputInterpreter>>nextCharFrom: sensor firstEvt: evtBuf
>> "Compose Unicode character sequences"
>> | peekEvent keyValue composed |
>> "Only try this if the first event is composable and is a character
>> event"
>> ((Unicode isComposable: (keyValue := evtBuf *sixth*))
>> and:[evtBuf fourth = EventKeyChar]) ifTrue:[ ... ].
>> "XXXX: Fixme. We should put the skipped event back if we haven't
>> consumed it."
>>
>> ^ *Unicode* value: keyValue
>>
>> Why evtBuf sixth ? Some keys on a Czech keyboard give me possibility to
>> type Czech characters with diacritical marks directly. Correct codes
>> (unicodes, e.g. 353 for $š) I've found in evtBuf at the sixth position, not
>> at the third. And the sixth position seems to be Ok for all characters.
>>
>
> Yes, that's correct. Mistake on my part. Element three is the old MacRoman
> value; number six is the UTF32 code point.
>
> And the last thing: When I run Squeak with an option - encoding UTF-8, I
>> think the UnicodeInputInterpreter should be installed. Otherwise I have to
>> do it manually (World primaryHand keyboardInterpreter:
>> UnicodeInputInterpreter new)
>>
>
> Right. I really dislike it that the Unix VM still doesn't use Unicode by
> default (as the Windows and Mac VMs do). Perhaps I can convince Ian to
> change the default.
Today I tested UnicodeInputInterpreter on Win XP and it works as well as on
Linux.
Cheers
Michal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20090827/d9f75622/attachment.htm
More information about the Squeak-dev
mailing list
|