<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">So, here is a really gross fix to make some of the “shifted” commands work.</div><div class="">(Did I mention “<i class=""><b class="">really gross</b></i>”?!? :-) )</div><div class="">(And … I just noticed that my coding “style” is much more C-ish than Smalltalk-is. 😂)</div><div class=""><br class=""></div><div class="">But, it’s just part of my foray into learning how the system works and tweaking things without completely blowing up my “smalltalk world.” 😉</div><div class="">My changes are marked in <font color="#ff2600" class="">red</font>. (Assuming color makes it to the list … )</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><font face="Menlo" class="">TextEditor>>enclose: aKeyboardEvent<br class=""><span class="Apple-tab-span" style="white-space:pre">     </span>"Insert or remove bracket characters around the current selection."<br class=""><span class="Apple-tab-span" style="white-space:pre">  </span>"This is a user command, and generates undo"<br class=""><br class=""><span class="Apple-tab-span" style="white-space:pre">    </span>| left right startIndex stopIndex oldSelection which <font color="#ff2600" class="">aKey</font>|<br class=""></font><font face="Menlo" class=""><font color="#ff2600" class=""><span class="Apple-tab-span" style="white-space:pre">   </span>aKey _ aKeyboardEvent keyCharacter.</font></font></div><div class=""><font face="Menlo" class=""><font color="#ff2600" class=""><span class="Apple-tab-span" style="white-space:pre"><span style="white-space: normal;" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>“Account for [shifted] characters that we know about (there may be others …)"<br class=""></span></span><span class="Apple-tab-span" style="white-space:pre">  </span>aKeyboardEvent shiftPressed<span class="Apple-tab-span" style="white-space:pre"><br class=""></span></font></font></div></blockquote><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><font face="Menlo" color="#ff2600" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>ifTrue: [<br class=""><span class="Apple-tab-span" style="white-space:pre">              </span>which _ '9,[''' indexOf: aKey.<br class=""><span class="Apple-tab-span" style="white-space:pre">         </span>0 < which<br class=""><span class="Apple-tab-span" style="white-space:pre">           </span>ifTrue: [<br class=""><span class="Apple-tab-span" style="white-space:pre">                      </span>aKey _ ('(<{"') at: which<br class=""><span class="Apple-tab-span" style="white-space:pre">              </span>]. <br class=""><span class="Apple-tab-span" style="white-space:pre">       </span>].</font><div class=""><font face="Menlo" class=""><font color="#ff2600" class=""><span class="Apple-tab-span" style="white-space:pre">                </span></font></font></div><div class=""><font face="Menlo" class=""><font color="#ff2600" class="">"<span class="Apple-tab-span" style="white-space:pre">   </span>Transcript</font></font></div><div class=""><font face="Menlo" class=""><font color="#ff2600" class=""><span class="Apple-tab-span" style="white-space:pre">               </span>show: ('enclose: key = [{1}]; shift pressed = [{2}]' format: { aKey. (aKeyboardEvent shiftPressed) });</font></font></div><div class=""><font face="Menlo" class=""><font color="#ff2600" class=""><span class="Apple-tab-span" style="white-space:pre">           </span>newLine.</font></font></div><div class=""><font color="#ff2600" face="Menlo" class=""><span style="caret-color: rgb(255, 38, 0);" class="">”</span></font></div><div class=""><font face="Menlo" class=""><span class="Apple-tab-span" style="white-space:pre">    </span>startIndex _ self startIndex.</font></div><div class=""><font face="Menlo" class=""><span class="Apple-tab-span" style="white-space:pre">  </span>stopIndex _ self stopIndex.</font></div><div class=""><font face="Menlo" class=""><span class="Apple-tab-span" style="white-space:pre">    </span>oldSelection _ self selection.</font></div><div class=""><font face="Menlo" class=""><font color="#ff2600" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>which _ '([<{"''`' indexOf: aKey ifAbsent: [ ^true ].</font></font></div><div class=""><font face="Menlo" class=""><font color="#ff2600" class=""><span class="Apple-tab-span" style="white-space:pre">    </span>"which _ '([<{""''`' indexOf: aKeyboardEvent keyCharacter ifAbsent: [ ^true ]."</font></font></div><div class=""><font face="Menlo" class=""><span class="Apple-tab-span" style="white-space:pre">    </span>left _ '([<{"''`' at: which.</font></div><div class=""><font face="Menlo" class=""><span class="Apple-tab-span" style="white-space:pre">   </span>right _ ')]>}"''`' at: which.</font></div><div class=""><br class=""></div><div class=""><b class="">… rest of method follows …</b></div></blockquote><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""></div></blockquote><div class=""><br class=""></div><div class="">Note: <font face="Menlo" class="">cmd-(</font> and <font face="Menlo" class="">cmd-<</font> still do not work because it seems like <font face="Menlo" class="">cmd-9</font> and <font face="Menlo" class="">cmd-,</font> are captured before this code gets a chance to test them.</div><div class=""><br class=""></div>Obviously, this still does not address the more fundamental issue that “shifted” keys are not correctly placed in the <font face="Menlo" color="#4e7a27" class="">aKeyboardEvent</font> variable when a keystroke is first hit, which is where it should happen.<div class=""><div class=""><br class=""></div><div class="">Where do user events ultimately come from? Is the CogVM? Or somewhere within Cuis Smalltalk itself?</div><div class=""><br class=""><div class="">Thanks,</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">   </span>— Mark</div><div class=""><br class=""><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Nov 23, 2021, at 7:07 AM, Mark de Jong via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st" class="">cuis-dev@lists.cuis.st</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div dir="auto" class="">Hi Juan,<div class=""><br class=""></div><div class="">Ah. Thanks. That helps.</div><div class=""><br class=""></div><div class="">I played with “Sensor test” — is there a “secret handshake” keystroke combination that will stop it? Or do I have completely quit Cuis and relaunch to get out of it? 🤔😉</div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">    </span>— Mark</div><div class=""><br class=""></div><div class="">P.S. Juan: your message, below, was truncated when it arrived in my email box. I ended up going to the web page (<a href="https://lists.cuis.st/mailman/archives/cuis-dev/2021-November/004427.html" class="">https://lists.cuis.st/mailman/archives/cuis-dev/2021-November/004427.html </a>) to read your note, since it did not show up properly in Mail. No clue why that happened. Other messages arrive just fine. This is just an FYI for you.</div><div class=""><br class=""></div><div class=""><div dir="ltr" class="">Sent from my iPad</div><div dir="ltr" class=""><br class=""><blockquote type="cite" class="">On Nov 23, 2021, at 5:42 AM, Juan Vuletich <<a href="mailto:juan@jvuletich.org" class="">juan@jvuletich.org</a>> wrote:<br class=""><br class=""></blockquote></div><blockquote type="cite" class=""><div dir="ltr" class="">-- 
Cuis-dev mailing list
<a href="mailto:Cuis-dev@lists.cuis.st" class="">Cuis-dev@lists.cuis.st</a>
<a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" class="">https://lists.cuis.st/mailman/listinfo/cuis-dev</a>
</div></blockquote></div></div>-- <br class="">Cuis-dev mailing list<br class=""><a href="mailto:Cuis-dev@lists.cuis.st" class="">Cuis-dev@lists.cuis.st</a><br class="">https://lists.cuis.st/mailman/listinfo/cuis-dev<br class=""></div></blockquote></div><br class=""></div></div></div></div></body></html>