[Newbies] BUG in keyboard sequence for commenting region ?

K K Subbu kksubbu.ml at gmail.com
Mon Aug 5 05:55:56 UTC 2019


On 05/08/19 9:30 AM, Nicola Mingotti wrote:
> I am using Squeak5.2, in MacOS.
> 
> According to Help -> Keyboard Shortcut:
> ----
> Ctrl-'	Toggle enclosure within double-quotes
> Cmd-'	Toggle enclosure within single-quotes
> ----
> 
> Neither of those works. The only way to make a selected part of text
> commented is to press Shift+' . This sequence does not toggle, it
> just quotes the region.
> 
> I may have installed a nasty package because I am pretty sure I was
> able to comment/uncomment regions a few days ago.
> 
> Do you observe the same behavior ?

I am unable to reproduce this in Squeak 5.2-18231 (Linux 64b). Alt-' 
(Alt in Linux = Cmd key in Mac) works as expected. Ctrl-' is treated 
like alt-shift-' (alt-").

> Post Scriptum: Can you tell me where this is implemented and save m
> X hours of digging ?:)  I would like to change it a bit.

TextEditor>>enclose: handles this action. This method is invoked from a 
lookup table cmdMap initialized in TextEditor 
class>>initializeCmdKeyShortcuts.

BTW, you may want to keep the following code snippets handy in a 
workspace to debug keyboard events:

HandMorph showEvents: true
HandMorph showEvents: false

HTH .. Subbu


More information about the Beginners mailing list