<div class="gmail_quote">2009/8/27 Andreas Raab <span dir="ltr">&lt;<a href="mailto:andreas.raab@gmx.de">andreas.raab@gmx.de</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Michal Perutka wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
UnicodeInputInterpreter&gt;&gt;nextCharFrom: sensor firstEvt: evtBuf<br>
    &quot;Compose Unicode character sequences&quot;<br>
    | peekEvent keyValue composed |<br>
    &quot;Only try this if the first event is composable and is a character event&quot;<br>
    ((Unicode isComposable: (keyValue := evtBuf *sixth*))<br>
        and:[evtBuf fourth = EventKeyChar]) ifTrue:[ ... ].<br>
    &quot;XXXX: Fixme. We should put the skipped event back if we haven&#39;t consumed it.&quot;<br>
<br>
    ^ *Unicode* value: keyValue<br>
<br>
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&#39;ve found in evtBuf at the sixth position, not at the third. And the sixth position seems to be Ok for all characters.<br>

</blockquote>
<br>
Yes, that&#39;s correct. Mistake on my part. Element three is the old MacRoman value; number six is the UTF32 code point.<font color="#888888"></font></blockquote><div><br><br>Using evtBuf sixth throughout the method brought me problems with  ctrl-c, ctrl-s, etc. and even scrolling by a mouse wheel stopped working. This modification seems to fix them:<br>
</div></div><br>UnicodeInputInterpreter&gt;&gt;nextCharFrom: sensor firstEvt: evtBuf <br>    &quot;Compose Unicode character sequences&quot;<br>    &quot;Only try this if the first event is composable and is a character event&quot;<br>
    | peekEvent keyValue composed |<br>    keyValue := evtBuf sixth &gt; 127  ifTrue: [evtBuf sixth] ifFalse: [evtBuf third].<br>    ((Unicode isComposable: keyValue)  and: [evtBuf fourth = EventKeyChar])<br>        ifTrue: [ ...<br>
<br>Cheers<br>Michal<br>