<div dir="ltr"><br><div><div>The Cocoa based VM returns  this. </div><div><br></div><div><div>#(2 156576 0 1 8 0 0 1)</div><div>#(2 156576 97 0 8 97 0 1)</div><div>#(2 156576 0 2 8 0 0 1)</div></div></div><div><br></div><div><br></div><div>Looks like cmd-a returns on a Squeak 4.2.5 vm does return.</div><div><div>#(2 267194 0 1 8 0 0 1)</div><div>#(2 267194 97 0 8 97 0 1)</div><div>#(2 267295 0 2 64 0 0 1)</div></div><div><br></div><div>Shrug,  no support for that code base now... </div><div>At this point you should migrate to the cocoa based VM. <br></div><div><br></div><div>Also see </div><div><a href="https://isqueak.org/ioGetNextEvent">https://isqueak.org/ioGetNextEvent</a><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 22, 2015 at 11:39 AM, Kruck, Bastian <span dir="ltr">&lt;<a href="mailto:Bastian.Kruck@student.hpi.uni-potsdam.de" target="_blank">Bastian.Kruck@student.hpi.uni-potsdam.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br>Hello Folks,<br>
<br>
when looking for how Cog passes keystrokes to the image, we found that the modifier bitmap of the keyUp events is left shifted by 3 bits on OS X. This seems to be a bug in Mac OS specific event handling. sqMacUIEvents.c usually unshifts the mouse buttons away before passing it to the image, but it doesn’t do that for keyup events. Something that I oversee here? This could be a fix:<br>
<br>
Index: platforms/Mac OS/vm/sqMacUIEvents.c<br>
===================================================================<br>
--- platforms/Mac OS/vm/sqMacUIEvents.c (revision 3312)<br>
+++ platforms/Mac OS/vm/sqMacUIEvents.c (working copy)<br>
@@ -1717,7 +1717,7 @@<br>
                        //fprintf(stdout,&quot;\nrawkey up %i&quot;,ioMSecs());<br>
                        key = findInKeyMap(keyCode);<br>
                        if (key != -1) {<br>
-                               enterKeystroke ( EventTypeKeyboard,keyCode, EventKeyUp, 0, ModifierStateCarbon(event,0));<br>
+                               enterKeystroke ( EventTypeKeyboard,keyCode, EventKeyUp, 0, ModifierStateCarbon(event,0) &gt;&gt; 3);<br>
                        }<br>
                        removeFromKeyMap(keyCode);<br>
           result = eventNotHandledErr;<br>
<br>
Unfortunately, I couldn’t verify the fix as I am running Yosemite which seems to not be supported yet for building from source.<br>
<br>
I appended the changeset which we used to find that issue. Steps to reproduce:<br>
1) install our changeset into a Squeak4.5 image on OS X<br>
2) run `TempSettings printEvents: true.`<br>
3) open a Transcript<br>
4) Press cmd+a<br>
5) The fifth item of that Array should be 8 on the third time (but is 8&lt;&lt;3 instead)<br>
        #(2 15512120 0 1 8 0 0 1)<br>
        #(2 15512120 97 0 8 97 0 1)<br>
        #(2 15512198 0 2 64 0 0 1)<br>
<br>
<br>
Tobias commented that this bug could be duplicated to some other places (which we didn’t verify yet).<br>
I am not sure, how many projects already rely on this behavior and how to go on with that.<br>
<br>
BR,<br>
Bastian Kruck<br>
<br>
<br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">===========================================================================<br>John M. McIntosh. Corporate Smalltalk Consulting Ltd <a href="https://www.linkedin.com/in/smalltalk" target="_blank">https://www.linkedin.com/in/smalltalk</a><br>===========================================================================<br></div></div></div></div>
</div>