<div>Ok, so in reviewing GitHub, this change comes from <br></div><div>https://github.com/pharo-project/pharo-vm/commit/e80301237d8f23d0da0db80fe1ebbcc5ee049c2d<br></div><div><br></div><div>"Fake mouse wheel events with all modifier keys pressed (not just ctrl)"<br></div><div><br></div><div>What made it unclear was I hand merged the Pharo & Pyonkee changes in early 2015, thus losing the historical Git information found in the pharo git repository. In this case I'll suspect there is changes to the event handling in Pharo which perhaps are not in Squeak Smalltalk base?<br></div><div><br></div><div>JMM - integrate Pyonkee & Pharo changes to cocoa os-x and iPhone code base <br>git-svn-id: http://squeakvm.org/svn/squeak/trunk@3324 fa1542d4-bde8-0310-ad64-8ed1123d492a<br>Former-commit-id: e11f52c96c104466f3636f9cfb8f1d8bc4219b56</div><div>Commit:346a75a0cbf554bfe5aed0281283fd19f8a38fef [346a75a0c]<br></div><div>Parents:839962918e<br></div><div>Author:John McIntosh <johnmci@smalltalkconsulting.com><br></div><div>Date:May 7, 2015 at 11:23:28 AM PDT <br></div><div><br></div><div>....<br></div><div>John M. McIntosh. Corporate Smalltalk Consulting Ltd https://www.linkedin.com/in/smalltalk<br></div><div class="protonmail_signature_block"><div class="protonmail_signature_block-proton protonmail_signature_block-empty"><br></div></div><div><br></div><div>‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐<br></div><div> On Wednesday, November 7, 2018 7:32 AM, Eliot Miranda <eliot.miranda@gmail.com> wrote:<br></div><div> <br></div><blockquote type="cite" class="protonmail_quote"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi All,<br></div><div><br></div><div>    this morning I've looked at some platform even t code to address an issue with scrolling that Chris Muller was bitten by.  In reading the code I've tried to make the code comprehensible to others who may come to read it. In particular I changed this code in platforms/iOS/vm/OSX/sqSqueakOSXApplication+events.m<br></div><div><br></div><div><div>        evt.charCode = keyCode;<br></div><div>        evt.utf32Code = 0;<br></div><div>        evt.reserved1 = 0;<br></div><div>        evt.modifiers = (CtrlKeyBit | OptionKeyBit | CommandKeyBit | ShiftKeyBit);<br></div><div>        evt.windowIndex = windowIndex;<br></div><div>        [self pushEventToQueue:(sqInputEvent *) &evt];<br></div></div><div><br></div><div>to read<br></div><div><div>        evt.charCode = keyCode;<br></div><div>        evt.utf32Code = 0;<br></div><div>        evt.reserved1 = 0;<br></div><div>       /* Set every meta bit to distinguish the fake event from a real right/left<br></div><div>        * arrow.<br></div><div>        */<br></div><div>        evt.modifiers = (CtrlKeyBit | OptionKeyBit | CommandKeyBit | ShiftKeyBit);<br></div><div>        evt.windowIndex = windowIndex;<br></div><div>        [self pushEventToQueue:(sqInputEvent *) &evt];<br></div></div><div><br></div><div>After all, what the code does is obvious, but /why/ the code does what it does is not at all obvious.<br></div><div><br></div><div>In reading similar code on the other platforms I see things like this, an example from platforms/win32/vm/sqWin32Window.c:<br></div><div><br></div><div><div>      evt->modifiers = CtrlKeyBit;<br></div><div>#ifdef PharoVM<br></div><div>     evt->utf32Code = evt->charCode;<br></div><div>#else<br></div><div>      evt->utf32Code = 0;<br></div><div>#endif<br></div><div>      evt->reserved1 = 0;<br></div></div><div><br></div><div>Again, *why* the code sets utf32Code but not on Squeak, Newspeak, etc, is not at all obvious and it would be really helpful if it were commented so that the decision as to whether the ifdef might be eliminated and the code always set6 (surely preferable) would be made easier.<br></div><div><br></div><div>The lack of such comments makes managing this code very hard for those of us that are not platform experts but must maintain the code across all platforms because that's our lot in life.  The absence of such comments, when one is struggling to figure out what the hell is going on, feels like passive aggression ;-)  So if you've made some m modification to the platform code in the past few years and you haven't commented it to explain the *why*, please feel free to comment the code and commit or submit a pull request; it will be warmly appreciated.<br></div><div><br></div><div>Thank you!<br></div><div><div><br></div><div dir="ltr"><div dir="ltr"><div><span style="font-size:small"><div>_,,,^..^,,,_<br></div><div>best, Eliot<br></div></span></div></div></div></div></div></div></div></div></div></div></div></blockquote><div><br></div>