<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
                                        
                                        
                                            
                                        
                                        
                                        > <span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Morphic is a GUI. Its input handler should not have to deal with </span><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">host-specific modifiers and just map keycodes to selectors (commands).</span><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">The representation of such user-input events is not necessarily specific to Morphic, only that #keyStroke: interface is. In the long term, it would be nice to move "UserInputEvent" etc. out of Morphic into its own base package. This is a matter of finding a consistent, object-oriented representation for user-input events. :-) </span></div><div><br></div><div>I think the acual question is whether CTRL is a modifier key or not. As it appears here, CTRL does not only modify a key (character) but actually *modifies* a key (character). :-D Then, again, SHIFT does this, too. Hmmm...</div><div><br></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Best,</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Marcel</span></div><div class="mb_sig"></div>
                                        
                                        <blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 16.12.2019 15:47:57 schrieb K K Subbu <kksubbu.ml@gmail.com>:</p><div style="font-family:Arial,Helvetica,sans-serif">On 16/12/19 3:54 PM, Marcel Taeumel wrote:
<br>> MyMorph >> #handlesKeyboard: evt
<br>>     ^ true
<br>> MyMorph >> #keyStroke: evt
<br>>    (evt controlKeyPressed and: [evt keyCharacter = $c])
<br>>        ifTrue: [self terminateApplication].
<br>> 
<br>> Why? Because there might be the requirement to "terminate on ctrl+c" for 
<br>> some application and it would be nice if one could just implement it 
<br>> that way. :-)
<br>
<br>Morphic is a GUI. Its input handler should not have to deal with 
<br>host-specific modifiers and just map keycodes to selectors (commands).
<br>
<br>VM input plugin will parse CTRL+Q into keycode 16r11 to Squeak. Morphic 
<br>input handler will map this keycode to, say, #quitKey. so you should 
<br>just be able to write:
<br>
<br>MyMorph>>quitKey
<br>      self terminateApplication
<br>
<br>Later if we want to allow ALT+Q also to quit, then we just need to add a 
<br>single entry to the Morphic keycode map.
<br>
<br>> But maybe I am confusing "characters" and "keys" again. Happens way too 
<br>> quickly.
<br>It happens to me too, especially when working late into the night ;-).
<br>
<br>I think of a keycode as a SmallInt (or sequence of SmallInts) that 
<br>encodes a Character or Symbol (selector), just like a machine word 
<br>encoding integer or oop.
<br>
<br>Regards .. Subbu
<br></div></blockquote></div>