<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Hi,</p>
<p><br>
</p>
<p>I think this could be a bug in TextEditor>>#enclose:. <span style="font-size: 12pt;">On a Qwerty keyboard, everything might work as expected. But for example on a Qwertz keyboard, none of </span><span style="font-size: 12pt;">'{}|"<>' is entered by holding shift
 and pressing one of the keys for '[]\'',.'.</span></p>
<p><span style="font-size: 12pt;"><br>
</span></p>
<p><span style="font-size: 12pt;">But I do not really understand this method fully: When is this shift transformation ever used? At least in my image (running on Win10), <span>KeyboardEvent>>#keyCharacter always respects the shift state and directly returns
 $( or similar values. Disabling this section does not appear to change any observable behavior. Is this OS specific or even keyboard layout specific, or is #enclose: out of date?</span></span></p>
<p><span style="font-size: 12pt;"><span><br>
</span></span></p>
<p><span style="font-size: 12pt;"><span>In case the section is still relevant: Does Squeak currently has any logic regarding the local keyboard layout? If not, a simple approach might be to introduce a keyboard layout preference and to define a default dictionary
 for these shift replacements per keyboard layout.</span></span></p>
<p><span style="font-size: 12pt;"><span><br>
</span></span></p>
<p><span style="font-size: 12pt;"><span>Looking forward to your answers :)</span></span></p>
<p><span style="font-size: 12pt;"><span>Best,</span></span></p>
<p><span style="font-size: 12pt;"><span>Christoph</span></span></p>
<br>
<div style="color: rgb(0, 0, 0);">
<div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Beginners <beginners-bounces@lists.squeakfoundation.org> im Auftrag von K K Subbu <kksubbu.ml@gmail.com><br>
<b>Gesendet:</b> Montag, 5. August 2019 07:55 Uhr<br>
<b>An:</b> A friendly place to get answers to even the most basic questions about Squeak.; Nicola Mingotti<br>
<b>Betreff:</b> Re: [Newbies] BUG in keyboard sequence for commenting region ?</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">On 05/08/19 9:30 AM, Nicola Mingotti wrote:<br>
> I am using Squeak5.2, in MacOS.<br>
> <br>
> According to Help -> Keyboard Shortcut:<br>
> ----<br>
> Ctrl-'        Toggle enclosure within double-quotes<br>
> Cmd-' Toggle enclosure within single-quotes<br>
> ----<br>
> <br>
> Neither of those works. The only way to make a selected part of text<br>
> commented is to press Shift+' . This sequence does not toggle, it<br>
> just quotes the region.<br>
> <br>
> I may have installed a nasty package because I am pretty sure I was<br>
> able to comment/uncomment regions a few days ago.<br>
> <br>
> Do you observe the same behavior ?<br>
<br>
I am unable to reproduce this in Squeak 5.2-18231 (Linux 64b). Alt-' <br>
(Alt in Linux = Cmd key in Mac) works as expected. Ctrl-' is treated <br>
like alt-shift-' (alt-").<br>
<br>
> Post Scriptum: Can you tell me where this is implemented and save m<br>
> X hours of digging ?:)  I would like to change it a bit.<br>
<br>
TextEditor>>enclose: handles this action. This method is invoked from a <br>
lookup table cmdMap initialized in TextEditor <br>
class>>initializeCmdKeyShortcuts.<br>
<br>
BTW, you may want to keep the following code snippets handy in a <br>
workspace to debug keyboard events:<br>
<br>
HandMorph showEvents: true<br>
HandMorph showEvents: false<br>
<br>
HTH .. Subbu<br>
_______________________________________________<br>
Beginners mailing list<br>
Beginners@lists.squeakfoundation.org<br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" id="LPlnk839793" previewremoved="true">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
</div>
</span></font></div>
</div>
</body>
</html>