[squeak-dev] Unsaved text lost when pressing Ctrl+Page Down

Marcel Taeumel marcel.taeumel at hpi.de
Mon Nov 29 08:52:34 UTC 2021


Hi Jakob, hi all --

Given the current situation of your cross-platform key handling, it is advisable to not use #keyStroke (i.e., #keyCharacter) shortcuts with CTRL+<specialKey>.

...
CTRL+C <==> CTRL+Enter(3)
CTRL+J  <==> CTRL+Return(13)
CTRL+L  <==> CTRL+PageDown(12)
...


If you disable "Map ASCII control characters to printable characters", you can hit, e.g.,  CTRL+C and actually get "Character enter". If you enable it, you get $c.

That's why you might want to implement such shortcuts via #keyDown. Yet, I just noticed that this does not work with CTRL+M on Windows ... -.-" ... 

CTRL+M <==> CTRL+Return(13)

Take a look at an ASCII table to understand the current issues regarding CTRL combinations with letters.

Best,
Marcel

P.S.: Note that Squeak's TextEditor has both shortcuts for control keys (ASCII < 32) as well as with the CMD/Command modifier. Some of them can be shifted as well. It's a mess. :-)
Am 28.11.2021 21:38:37 schrieb Thiede, Christoph <christoph.thiede at student.hpi.uni-potsdam.de>:
Great to know, will update my Squot soon! By the way, you could use a keylogger for another level of "backups as you type". :D

Best,
Christoph
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Jakob Reschke <jakres+squeak at gmail.com>
Gesendet: Sonntag, 28. November 2021 21:28:12
An: The general-purpose Squeak developers list
Betreff: Re: [squeak-dev] Unsaved text lost when pressing Ctrl+Page Down
 
Ok, makes sense... kind of. ;-)

Fortunately I was able to recall what I typed.

(Off topic, but related to the change: if you want committing from the
Git Browser to be much faster with FileTree repositories, you can be
my fearless beta tester by updating it from the develop branch. It
only writes the changed files out now, and I optimized away some
unnecessary computations after writing the commit. No new version
released yet.)

Am So., 28. Nov. 2021 um 20:58 Uhr schrieb Thiede, Christoph
<Christoph.Thiede at student.hpi.uni-potsdam.de>:
>
> Hi Jakob,
>
>
> feeling with you, lost changes can be so evil.
>
>
> I just inspected a Ctrl + PgDown event using the KeyboardExerciser and currently, the Windows VM reports the key value 108 for this, which corresponds to Ctrl-Cmd-l (canceL). So this boils down to a known bug in the Win32 VM event handling ... If you need a really crazy workaround, you could try to map all Ctrl + <special key> shortcuts to Alt + <special key> shortcuts for Squeak.exe via AutoHotkey. ;-)
>
>
> Best,
>
> Christoph
>
> ________________________________
> Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Jakob Reschke <jakres+squeak at gmail.com>
> Gesendet: Sonntag, 28. November 2021 19:28:19
> An: The general-purpose Squeak developers list
> Betreff: Re: [squeak-dev] Unsaved text lost when pressing Ctrl+Page Down
>
> Hi Eliot,
>
> Thank you, but unfortunately I never accepted the changes in the text
> editor during that time. So there is nothing relevant in the changes
> file.
>
> Sometimes it needs experiences like this to remind me that it is still
> a good idea to frequently save things.
>
> Kind regards,
> Jakob
>
> Am So., 28. Nov. 2021 um 19:16 Uhr schrieb Eliot Miranda
> <eliot.miranda at gmail.com>:
> >
> > Hi Jakob,
> >
> >    just checking you know about Recently Logged Changes.  That will allow you to replay your work, which is recorded on the changes file.
> >
> > _,,,^..^,,,_ (phone)
> >
> > > On Nov 28, 2021, at 9:39 AM, Jakob Reschke <forums.jakob at resfarm.de> wrote:
> > >
> > > Dear all,
> > >
> > > I just lost half an hour of method changes by accidentally hitting
> > > Ctrl+PgDown (the PgDown key is directly adjacent to the right arrow
> > > key on my compact keyboard). There was no prompt or warning about
> > > "Changes have not been saved", it is just gone.
> > >
> > > 1) What is the intended effect of Ctrl+PgDown? (Note that I am not
> > > asking about Cmd+PgDown, which does not seem to be any different than
> > > just PgDown, scrolling and taking the cursor with it.) I could not
> > > find it in the "Keyboard Shortcuts" from the Help menu. The observable
> > > effect is the same as Cmd+l (cancel).
> > > 2) Should it not ask with the usual popup dialog whether it is ok to
> > > lose the changes?
> > >
> > > Windows 10, Trunk image, last updated one or two weeks ago.
> > > Map CONTROL keys to COMMAND keys: enabled.
> > > Map ASCII control characters to printable characters: enabled.
> > > Map ALT keys to OPTION keys: enabled.
> > >
> > > Kind regards,
> > > Jakob
> > >
> >
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20211129/ee035625/attachment.html>


More information about the Squeak-dev mailing list