<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>This is my work around for keyboard shortcuts with 
the Unicode VM...</FONT></DIV>
<DIV><FONT face=Arial size=2>The UnicodeInputInterpreter has this method 
</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>nextCharFrom: sensor firstEvt: evtBuf</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;| keyValue |<BR>" Unicode charCode expected 
as the sixth data member ! "</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>"If Alt or Ctrl is&nbsp;pressed and we have a 
unicode char code... delegate shortcut conversion to the locale specific 
class..."</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;(((evtBuf fifth = 2 or: [evtBuf fifth = 8])) 
and: [evtBuf sixth &gt; 255])<BR>&nbsp;&nbsp;ifTrue: 
[<BR>&nbsp;&nbsp;&nbsp;&nbsp;keyValue := evtBuf 
sixth.<BR>&nbsp;&nbsp;&nbsp;&nbsp;^ Character value:(((Locale currentPlatform) 
languageEnvironment) unicodeToLatinCharMap:keyValue).]</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;ifFalse: [keyValue := evtBuf 
sixth.].<BR>&nbsp;^ keyValue asCharacter.<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>(OK, it needs some refactoring but you get the 
clue...)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2>&nbsp;</DIV></FONT>
<DIV><FONT face=Arial size=2>Now the specific locale class (for me is the 
GreekEnvironment class) must have an instance method called</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 
unicodeToLatinCharMap:charCode</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>that will convert the unicode char codes 
to&nbsp;MacRoman codes&nbsp;that work for the shortcuts.</FONT></DIV>
<DIV><FONT face=Arial size=2>I know the the all-around conversion back to 
MacRoman seems redundant, but at least we avoided the pollution of the unicode 
environment classes with locale specific code...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>The trick was that we can get an instance of the 
current LanguageEnvironment, without referring to it, with</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; (Locale currentPlatform) 
languageEnvironment</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Good Smalltalk...good...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I don't know though for how long we are going to 
get away with it this way...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Christos.</DIV></FONT></BODY></HTML>