Linux Squeak VM X11 keyboard changes?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Linux Squeak VM X11 keyboard changes?

Tim Johnson-2
 
Hi,

I recently upgraded the squeak-cog-spur VM on my 32-bit Linux x86 VM from one dated "Oct 21  2018" to one I built based on the latest snapshot from GitHub as of yesterday morning (sqcogspurlinuxht).  

I used it via X11 this morning and noticed that I could Ctrl-D to "Do it" anymore – now it is "Debug it."  In fact, I can't Ctrl-P for Print it either...

And it's not my image – I tried using a fresh 5.2 image also.

I wonder if anyone else experiences the same...?

Could I perhaps have not built the VM correctly...?  I basically just did a clean build without changing any configure options.

Thanks,
Tim

Reply | Threaded
Open this post in threaded view
|

Re: Linux Squeak VM X11 keyboard changes?

K K Subbu
 
On 22/05/19 9:31 PM, Tim Johnson wrote:
> I used it via X11 this morning and noticed that I could Ctrl-D to "Do
> it" anymore – now it is "Debug it."  In fact, I can't Ctrl-P for
> Print it either...

Ctrl-d is do it and Ctrl-Shift-D is debug. Perhaps, your capslock was
turned on by accident?

Regards .. Subbu
Reply | Threaded
Open this post in threaded view
|

Re: Linux Squeak VM X11 keyboard changes?

Tim Johnson-2
 


On 2019-05-22 09:13, K K Subbu wrote:
> On 22/05/19 9:31 PM, Tim Johnson wrote:
>> I used it via X11 this morning and noticed that I could Ctrl-D to "Do
>> it" anymore – now it is "Debug it."  In fact, I can't Ctrl-P for
>> Print it either...
>
> Ctrl-d is do it and Ctrl-Shift-D is debug. Perhaps, your capslock was
> turned on by accident?

Good thought.  Oh, if only it were that simple :)

I tested my shift key, but of course if Caps Lock had been on, I would
not have been able to enter any of my passwords, and would have noticed
as I was typing into the Workspace...

I wonder if there is something that changed with modifier keys, or some
configuration I missed...

Thanks,
Tim
Reply | Threaded
Open this post in threaded view
|

Re: Linux Squeak VM X11 keyboard changes?

K K Subbu
In reply to this post by Tim Johnson-2
 
On 22/05/19 9:31 PM, Tim Johnson wrote:
> I recently upgraded the squeak-cog-spur VM on my 32-bit Linux x86 VM
> from one dated "Oct 21  2018" to one I built based on the latest
> snapshot from GitHub as of yesterday morning (sqcogspurlinuxht).
>
> I used it via X11 this morning and noticed that I could Ctrl-D to "Do
> it" anymore – now it is "Debug it."  In fact, I can't Ctrl-P for
> Print it either...

Yes. I can confirm this error with the latest VM from bintray on Ubuntu
16.04 (64b with 32b compat libraries) :

$ sqcogspurlinuxht/lib/squeak/5.0-201905151233/squeak
Squeak5.2-18231-32bit.image

Then press Skip -> World Menu->Workspace, type 3+4 and then Ctrl-P does
not print 7. whereas the 5.2 release version does print 7:

$ Squeak5.2-18231-32bit-201810190412-Linux/bin/squeak
Squeak5.2-18231-32bit.image

Regards .. Subbu
Reply | Threaded
Open this post in threaded view
|

Re: Linux Squeak VM X11 keyboard changes?

K K Subbu
 
On 24/05/19 10:56 AM, K K Subbu wrote:

> Yes. I can confirm this error with the latest VM from bintray on Ubuntu
> 16.04 (64b with 32b compat libraries) :
>
> $ sqcogspurlinuxht/lib/squeak/5.0-201905151233/squeak
> Squeak5.2-18231-32bit.image
>
> Then press Skip -> World Menu->Workspace, type 3+4 and then Ctrl-P does
> not print 7. whereas the 5.2 release version does print 7:
>
> $ Squeak5.2-18231-32bit-201810190412-Linux/bin/squeak
> Squeak5.2-18231-32bit.image

I did a bisection of all versions in
https://bintray.com/opensmalltalk/vm/cog/ and narrowed down the problem to

good squeak.cog.spur_linux32x86_201811272342.tar.gz
bad squeak.cog.spur_linux32x86_201812301551.tar.gz

The error is consistent on both 18231 and the oldest 18221 image.

Does anyone know what change went into the 201812 build? Something that
would affect 32-bit build but not 64b build?

Regards .. Subbu
Reply | Threaded
Open this post in threaded view
|

Re: Linux Squeak VM X11 keyboard changes?

K K Subbu
In reply to this post by Tim Johnson-2
 
On 22/05/19 9:31 PM, Tim Johnson wrote:
> I used it via X11 this morning and noticed that I could Ctrl-D to "Do
> it" anymore – now it is "Debug it."  In fact, I can't Ctrl-P for
> Print it either...
>
> And it's not my image – I tried using a fresh 5.2 image also.

Workaround: try using Alt instead of Ctrl. I tried Alt-D on
    Display flash: World bounds
and it worked. So did Alt-p to print 3+4.

HTH .. Subbu
Reply | Threaded
Open this post in threaded view
|

Re: Linux Squeak VM X11 keyboard changes?

Karl Ramberg
 
Have you tested changing the duplicate command key preferences ?

Best,
Karl


On Fri, May 24, 2019 at 8:31 AM K K Subbu <[hidden email]> wrote:
 
On 22/05/19 9:31 PM, Tim Johnson wrote:
> I used it via X11 this morning and noticed that I could Ctrl-D to "Do
> it" anymore – now it is "Debug it."  In fact, I can't Ctrl-P for
> Print it either...
>
> And it's not my image – I tried using a fresh 5.2 image also.

Workaround: try using Alt instead of Ctrl. I tried Alt-D on
    Display flash: World bounds
and it worked. So did Alt-p to print 3+4.

HTH .. Subbu
Reply | Threaded
Open this post in threaded view
|

Re: Linux Squeak VM X11 keyboard changes?

alistairgrant
In reply to this post by K K Subbu
 
Hi Subbu,


On Fri, 24 May 2019 at 08:14, K K Subbu <[hidden email]> wrote:

>
>
> On 24/05/19 10:56 AM, K K Subbu wrote:
> > Yes. I can confirm this error with the latest VM from bintray on Ubuntu
> > 16.04 (64b with 32b compat libraries) :
> >
> > $ sqcogspurlinuxht/lib/squeak/5.0-201905151233/squeak
> > Squeak5.2-18231-32bit.image
> >
> > Then press Skip -> World Menu->Workspace, type 3+4 and then Ctrl-P does
> > not print 7. whereas the 5.2 release version does print 7:
> >
> > $ Squeak5.2-18231-32bit-201810190412-Linux/bin/squeak
> > Squeak5.2-18231-32bit.image
>
> I did a bisection of all versions in
> https://bintray.com/opensmalltalk/vm/cog/ and narrowed down the problem to
>
> good squeak.cog.spur_linux32x86_201811272342.tar.gz
> bad squeak.cog.spur_linux32x86_201812301551.tar.gz
>
> The error is consistent on both 18231 and the oldest 18221 image.
>
> Does anyone know what change went into the 201812 build? Something that
> would affect 32-bit build but not 64b build?

My guess is that this is the relevant commit:

https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/1b837f94e96b93cb4d117ccdd010825d76dcde57#diff-e9d387f49791b823a087221b733a10b8

But there's nothing obviously 32 / 64 bit dependent that I can see.

HTH,
Alistair
Reply | Threaded
Open this post in threaded view
|

Re: Linux Squeak VM X11 keyboard changes?

K K Subbu
 
On 25/05/19 12:38 PM, Alistair Grant wrote:
> My guess is that this is the relevant commit:
>
> https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/1b837f94e96b93cb4d117ccdd010825d76dcde57#diff-e9d387f49791b823a087221b733a10b8
>
>  But there's nothing obviously 32 / 64 bit dependent that I can see.

Thanks. The problem may not be in this part of the code but could be a
unintended side effect of a change somewhere else.

EventSensor classPool associationAt: #KeyDecodeTable is different
between the good and bad VM. The good one has 184 entries while the bad
one has only 16 entries :-( See attached pics taken from the bad and
good VM.

I also noticed a possible problem in Editor>>initialize:
----
        self initializeKeystrokeActions.
        self allSubclassesDo: [ :c | c initialize ]
----

   Editor allSubclasses yields TextEditor SmalltalkEditor TextMorphEditor

So the loop will dispatch TextMorphEditor(TextEditor)>>initialize after
SmalltalkEditor>>initialize and override cmdActions and shiftCmdActions
map augmented by the latter.

Regards .. Subbu

18221-32b-bad.png (29K) Download Attachment
18221-32b-good.png (38K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Linux Squeak VM X11 keyboard changes?

K K Subbu
In reply to this post by Karl Ramberg
 
On 25/05/19 12:24 AM, karl ramberg wrote:
> Have you tested changing the duplicate command key preferences ?

Yes. That doesn't affect the result .. Subbu
Reply | Threaded
Open this post in threaded view
|

Re: Linux Squeak VM X11 keyboard changes?

K K Subbu
In reply to this post by alistairgrant
 
On 25/05/19 12:38 PM, Alistair Grant wrote:
> My guess is that this is the relevant commit:
>
> https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/1b837f94e96b93cb4d117ccdd010825d76dcde57#diff-e9d387f49791b823a087221b733a10b8
>
>  But there's nothing obviously 32 / 64 bit dependent that I can see.

I did some more tracing. The bad 32b VM is returning a different
modifier bit (64 instead of 16) in the keyboard event compared to the
good VMs. See attached pics.

Here are the steps to reproduce the problem.

  * start the image with good vm (first round) and bad vm (second round)
  * press skip
  * world menu -> workspace. Type 3+4
  * Type dispatchOnKey in search bar
  * In the method pane of the result, type "self halt" just above
"backspace ...."
  * right click -> accept
  * select workspace and press Ctrl-p. This will throw a Halt dialog
  * select debug and click on dispatchOnKeyboardEvent (one level below)
  * right click on aKeyboardEvent in variable pane and select explore.
  * expand "buttons" slot to get the modifier bits.

The 32b VMs were run on Ubuntu 16.04 (64b) with 32b compat libraries. I
don't have access to a native 32b linux.

Regards .. Subbu

18221-badkbd.png (105K) Download Attachment
18221-goodkbd.png (106K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Linux Squeak VM X11 keyboard changes?

K K Subbu
 
On 27/05/19 10:11 AM, K K Subbu wrote:

>
>   * start the image with good vm (first round) and bad vm (second round)
>   * press skip
>   * world menu -> workspace. Type 3+4
>   * Type dispatchOnKey in search bar
>   * In the method pane of the result, type "self halt" just above
> "backspace ...."
>   * right click -> accept
>   * select workspace and press Ctrl-p. This will throw a Halt dialog
>   * select debug and click on dispatchOnKeyboardEvent (one level below)
>   * right click on aKeyboardEvent in variable pane and select explore.
>   * expand "buttons" slot to get the modifier bits.

I found a better way:

* In the workspace, type "Object setHaltOnce" in another line.
* In the method pane of the result, type "aKeyboardEvent inspectOnce"
just above backspace.
* right click -> accept.
* select workspace, right click just after 'setHaltOnce' and then 'doit'
* click just after '3+4' and press Ctrl-p. This will bring up an
inspector. Click on 'explore' to get to the buttons.

Grabbing the inspector just once will allow us to inspect Ctrl-p key
while letting all subsequent keys through, without having to revert the
change. We just have to remember to arm the counter before trying to
inspect next keystroke.

Regards .. Subbu
Reply | Threaded
Open this post in threaded view
|

Re: Linux Squeak VM X11 keyboard changes?

Karl Ramberg
 
Does it show the error with HandMorph showEvents: true ?

Best,
Karl


On Mon, May 27, 2019 at 8:02 AM K K Subbu <[hidden email]> wrote:
On 27/05/19 10:11 AM, K K Subbu wrote:
>
>   * start the image with good vm (first round) and bad vm (second round)
>   * press skip
>   * world menu -> workspace. Type 3+4
>   * Type dispatchOnKey in search bar
>   * In the method pane of the result, type "self halt" just above
> "backspace ...."
>   * right click -> accept
>   * select workspace and press Ctrl-p. This will throw a Halt dialog
>   * select debug and click on dispatchOnKeyboardEvent (one level below)
>   * right click on aKeyboardEvent in variable pane and select explore.
>   * expand "buttons" slot to get the modifier bits.

I found a better way:

* In the workspace, type "Object setHaltOnce" in another line.
* In the method pane of the result, type "aKeyboardEvent inspectOnce"
just above backspace.
* right click -> accept.
* select workspace, right click just after 'setHaltOnce' and then 'doit'
* click just after '3+4' and press Ctrl-p. This will bring up an
inspector. Click on 'explore' to get to the buttons.

Grabbing the inspector just once will allow us to inspect Ctrl-p key
while letting all subsequent keys through, without having to revert the
change. We just have to remember to arm the counter before trying to
inspect next keystroke.

Regards .. Subbu
Reply | Threaded
Open this post in threaded view
|

Re: Linux Squeak VM X11 keyboard changes?

K K Subbu
 
On 28/05/19 12:19 AM, karl ramberg wrote:
> Does it show the error with HandMorph showEvents: true ?

Thank you for this excellent tip.

Pressing Ctrl shows up as "keyDown Ctrl-Opt-û" (251). Now if I press p
it shows "keyStroke Ctrl-p (112)". If I release p key, it continues to
show "keyUp Ctrl-p (112)". If I release Ctrl now, it shows "keyUp û (251)".

In the good image, pressing p after Ctrl shows up as "Cmd-p (112)"

Regards .. Subbu