[OpenSmalltalk/opensmalltalk-vm] Linux Squeak VM X11 keyboard changes breaks 32b VM (#396)

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

Re: [OpenSmalltalk/opensmalltalk-vm] Linux Squeak VM X11 keyboard changes breaks 32b VM (#396)

David T Lewis
 

I wonder if some of what we're uncovering here is also related to why, on a Mac OS VM, the Alt/Option key will often be "stuck" after I Cmd-Tab to switch to a different task and then return. I often find that I have to hit Alt/Option once to "unstick" it after Cmd-Tab switching back to Squeak.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/396?email_source=notifications\u0026email_token=AIJPEW5KGYIG4Y6QQW444G3P2FBLHA5CNFSM4HP46HZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXROZNY#issuecomment-501410999", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/396?email_source=notifications\u0026email_token=AIJPEW5KGYIG4Y6QQW444G3P2FBLHA5CNFSM4HP46HZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXROZNY#issuecomment-501410999", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Linux Squeak VM X11 keyboard changes breaks 32b VM (#396)

David T Lewis
In reply to this post by David T Lewis
 

Thanks Subbu! KeyDecodeTable was the piece that I missed. I searched where the hell in the VM this CTRL->CMD modifier dance was performed, but failed to find it. It was in the image of course! It certainly IS the key of the problem.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/396?email_source=notifications\u0026email_token=AIJPEW6PFPZVS6UN65GCWMDP2FJ3PA5CNFSM4HP46HZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXRVB5Q#issuecomment-501436662", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/396?email_source=notifications\u0026email_token=AIJPEW6PFPZVS6UN65GCWMDP2FJ3PA5CNFSM4HP46HZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXRVB5Q#issuecomment-501436662", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Linux Squeak VM X11 keyboard changes breaks 32b VM (#396)

timrowledge
 


> On 2019-06-12, at 1:10 PM, Nicolas Cellier <[hidden email]> wrote:
>
> Thanks Subbu! KeyDecodeTable was the piece that I missed. I searched where the hell in the VM this CTRL->CMD modifier dance was performed, but failed to find it. It was in the image of course! It certainly IS the key of the problem.

This is part of a problem I've seen too many times over the years; something needs a 'tweak' for platform A - change is made in the platform code. That leads to problems for platforms B & C, and changes are made in the image. We end up with a curious and impenetrable mix of image and platform code doing weird things... and years later no one can remember anything about it.


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Strange OpCodes: LD: Lose Device


Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Linux Squeak VM X11 keyboard changes breaks 32b VM (#396)

David T Lewis
In reply to this post by David T Lewis
 

So why does CTRL+d work?

If you have Preferences duplicateAllControlAndAltKeys = true, then

KeyDecodeTable at: { key bitAnd: 16r9F . 2 } put: { key . 8 }.

will replace Ctrl-d code (0x4) + CTRL modifier (2) by $d + CMD modifier (8).

Indeed, 0x4 = $d asInteger bitAnd: 16r9F- since bitAnd: 16r9F is like subtracting 64 from uppercase letters, and subtracting 96 from lowercase letters. Note that such 16r9F may have all sort of unpalatable effects on internationalized characters + CTRL... It's not internationalization friendly.

If you have a VM outputting $d + CTRL, then this translation does NOT happen, and we encounter the strange code in TextEditor>>dispatchOnKeyboardEvent: that interprets CTRL modifier as SHIFT+CMD... That's complete madness at image side, so IMO we'd better not fix the VM (well we should continue cleaning, but not for this bug)!

Why 32 and 64 bits image differ?

They don't. Only the preferences may differ or not... So some squeakers will reproduce the problem some not, it's just random.

If other preferences is selected, like Preferences duplicateControlAndAltKeys = true, the problem will only ever happen with self defaultCrossPlatformKeys, that is CTRL+a c x v f g s z.

It may also depends on the World currentHand keyboardInterpreter class, because if VM delivers event at: 3 as Ctrl-d and event at: 6 as $d asInteger, then depending on which KeyDecodeTable translations happens, and which of the two codes is taken into account in the morphic KeybordEvent, that's quite many different possible behaviors, not all of which are inline with our expectations.

We see that fixing the VM to make Brick/Bloc/GT/Whatever work, may break Morphic/MVC because they already have crooked workarounds that now fail. We arrived at a point where we cannot change a single feature without breaking another. Unpalatable!

It does not mean we do not have to change things. We want to be able to evolve. We want a VM doing what it says and saying what it does (specs and docs please!), if possible not too complex things: that is transform OS specific events into platform agnostic events (preferably union of possible events rather than intersection IMO, or we'll never be on tablets and phones). While increasing VM consistency, we can start to disentangling image code and remove some hacks.

But for this to happen, we have to put all expectations on the table and make some choice. CTRL = SHIFT+CMD is highly questionable for example, I'd like to know where it comes from to begin with? This is not the place to debate that, it's Squeak specific.

I would rather close the issue and fix Squeak. Thoughts?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/396?email_source=notifications\u0026email_token=AIJPEW773RYFPCKIJGAWIQTP2FSCHA5CNFSM4HP46HZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXR2WEI#issuecomment-501459729", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/396?email_source=notifications\u0026email_token=AIJPEW773RYFPCKIJGAWIQTP2FSCHA5CNFSM4HP46HZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXR2WEI#issuecomment-501459729", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Linux Squeak VM X11 keyboard changes breaks 32b VM (#396)

David T Lewis
In reply to this post by David T Lewis
 

> On 12.06.2019, at 23:20, Nicolas Cellier <[hidden email]> wrote:
>
> (preferably union of possible events rather than intersection IMO, or we'll never be on tablets and phones)

The SDL Events are pretty good, I recon…


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/396?email_source=notifications\u0026email_token=AIJPEWYBTTFPFV6RLSA4XYDP2FVQPA5CNFSM4HP46HZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXR4W6I#issuecomment-501468025", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/396?email_source=notifications\u0026email_token=AIJPEWYBTTFPFV6RLSA4XYDP2FVQPA5CNFSM4HP46HZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXR4W6I#issuecomment-501468025", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Linux Squeak VM X11 keyboard changes breaks 32b VM (#396)

David T Lewis
In reply to this post by David T Lewis
 

I like the SDL events, and I already have them working on the Minheadless VM since 1-2 years ago:
https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/minheadless/sdl2-window/sqWindow-SDL2.c

We can use this for fixing the Keyboard and MOUSE inconsistency in Morphic for both Squeak, and Pharo. Mouse button numbers are also not assigned the same way in all the platforms.

The VM events are pushed into queue (implemented with a circular buffer) that are fetched by the InputEventSensor >> #nextEvent method in Pharo.

The SDL2 based display support in the Minheadless VM also allows the VM to handle SDL2 events that are not directed to the main VM window by exposing the following three primitives:

  • primitiveIsVMDisplayUsingSDL2
    -primitivePollVMSDL2Event -> Copy the content of a SDL_Event that is not directed to the VM window into a byteArray. These events are stored in separate circular buffer when they are received by the VM.
  • primitiveSetVMSDL2Input -> Registers an ExternalSemaphore which is signaled by the VM when an event is stored in this circular array.

The support for using these primitives is already implemented and integrated in the standard Pharo 7 image. Using this VM fixes OSWindow event handling in Mac and Windows (in Linux it have been always working perfectly).


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/396?email_source=notifications\u0026email_token=AIJPEW6N4P4TPIS3BRXRCLTP2HJWRA5CNFSM4HP46HZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXSRETA#issuecomment-501551692", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/396?email_source=notifications\u0026email_token=AIJPEW6N4P4TPIS3BRXRCLTP2HJWRA5CNFSM4HP46HZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXSRETA#issuecomment-501551692", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Linux Squeak VM X11 keyboard changes breaks 32b VM (#396)

David T Lewis
In reply to this post by David T Lewis
 

This issue occurs for me in our 5.3beta builds. I can only use alt+c/v/x/p... to trigger the usual actions, not ctrl+c/v/x/p... as it used to be.

I tried reverting the mentioned commit on the Cog branch, which I can confirm re-enables using the key combos as expected for me (1b837f9)


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/396?email_source=notifications\u0026email_token=AIJPEW2J7IMOHI5PBB2VEP3QY6YMDA5CNFSM4HP46HZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEG7MPBA#issuecomment-566151044", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/396?email_source=notifications\u0026email_token=AIJPEW2J7IMOHI5PBB2VEP3QY6YMDA5CNFSM4HP46HZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEG7MPBA#issuecomment-566151044", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Linux Squeak VM X11 keyboard changes breaks 32b VM (#396)

David T Lewis
In reply to this post by David T Lewis
 

I have fixed (patched?) ctrl+a to ctrl+z on linux VM.
Please check and report if we can close


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/396?email_source=notifications\u0026email_token=AIJPEW7HJW7OUSNGZ63IMTLQ2RW7PA5CNFSM4HP46HZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHVIDHY#issuecomment-569016735", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/396?email_source=notifications\u0026email_token=AIJPEW7HJW7OUSNGZ63IMTLQ2RW7PA5CNFSM4HP46HZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHVIDHY#issuecomment-569016735", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
12