<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style='font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif;'>Hi All,<br><br>I got pure Morphic MouseEvents forwarded just fine  (thanks to your help on the bit-fiddling)&nbsp; and the translation is good&nbsp;  enough to pop up a menu from the top menu bar.<br>I had a screenshot, but it bounced the first iteration of this&nbsp; message, so you will have to take my word on that. (:<br><br><br>Next up is KeyboardEvents and at first glance it looks a bit daunting. Here is why.<br><br>This method in HandMorph invokes one of ~18 subclasses of KeyboardInputInterpreter <br><br><br><blockquote style="border: 1px solid rgb(204, 204, 204); padding: 7px; background-color: rgb(245, 245, 245);"><div>HandMorph&gt;&gt;generateKeyboardEvent: evtBuf<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ....<br>&nbsp;&nbsp;&nbsp; type = #keystroke<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ifTrue: [keyValue := (self keyboardInterpreter nextCharFrom: Sensor firstEvt: evtBuf) asInteger]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...<br></div></blockquote> <br>That nextCharFrom: firstEvt: send is where it gets interesting as it is keyboard specific.<br><br>To see why, compare the implementation in<br><br><br><blockquote style="border: 1px solid rgb(204, 204, 204); padding: 7px; background-color: rgb(245, 245, 245);"><div> MacRomanInputInterpreter &gt;&gt;nextCharFrom: sensor firstEvt: evtBuf<br><br>&nbsp;&nbsp;&nbsp; | keyValue |<br>&nbsp;&nbsp;&nbsp; keyValue := evtBuf third.<br>&nbsp;&nbsp;&nbsp; ^ keyValue asCharacter macToSqueak.<br></div></blockquote> to<br><br><blockquote style="border: 1px solid rgb(204, 204, 204); padding: 7px; background-color: rgb(245, 245, 245);"><div><br>UnicodeInputInterpreter&gt;&gt;nextCharFrom: sensor firstEvt: evtBuf<br>&nbsp;&nbsp;&nbsp; "Compose Unicode character sequences"<br>&nbsp;&nbsp;&nbsp; | peekEvent keyValue composed |<br>&nbsp;&nbsp;&nbsp; "Only try this if the first event is composable and is a character event"<br>&nbsp;&nbsp;&nbsp; ((Unicode isComposable: (keyValue := evtBuf sixth)) <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; and:[evtBuf fourth = EventKeyChar]) ifTrue:[<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; "If we have a pending keyDown in the queue, skip that to get to the keystroke"<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; peekEvent := sensor peekEvent.<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (peekEvent notNil and: [peekEvent fourth = EventKeyDown]) ifTrue: [<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; "skipEvent := "sensor nextEvent.<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; peekEvent := sensor peekEvent].<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; "If we have another character event in the queue, compose it"<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (peekEvent notNil <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; and: [peekEvent first = EventTypeKeyboard <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; and:[peekEvent fourth = EventKeyChar]]) ifTrue:[<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; composed := Unicode compose: keyValue with: peekEvent sixth.<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; composed ifNotNil:[<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; sensor nextEvent.<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ^composed]]].<br>&nbsp;&nbsp;&nbsp; "XXXX: Fixme. We should put the skipped event back if we haven't consumed it."<br>&nbsp;&nbsp;&nbsp; ^keyValue asCharacter</div></blockquote> <br><br>So,  assume I have to stuff some unknown character into a primitive event to  feed to the simulator....I don't think "skooch and tack on" is going to  work like it did for the mouseEvents.<br><br>I will be examining this  more closely in a day or two as I have to focus on some&nbsp; work for a  client, but wanted to get it out there for your thoughts on the matter  in the meantime.<br><br><br>Thanks.<br><br>tty.<br><br><br>P.S. David,  when you get time, Eliot mentioned getting with you so I could  contribute my work. Let me know what I need to do at your convenience.<br></div></body></html>