[OpenSmalltalk/opensmalltalk-vm] Fix missing KeyRelease events when multiple keys are depressed. (#547)

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

[OpenSmalltalk/opensmalltalk-vm] Fix missing KeyRelease events when multiple keys are depressed. (#547)

David T Lewis
 

Reference Mantis 0007597 http://bugs.squeak.org/view.php?id=7597.
Rather than keep a single lastKey to remember the last previously
pressed key value, maintain an array size 256 of last key pressed values
indexed by X11 KeyCode. Works for any number of simultaneous keys.


You can view, comment on, or merge this pull request online at:

  https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/547

Commit Summary

  • Fix missing KeyRelease events when multiple keys are depressed.

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
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/pull/547", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/547", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Fix missing KeyRelease events when multiple keys are depressed. (#547)

David T Lewis
 

@eliotmiranda commented on this pull request.

Hi David, I would bite the bullet and write an explicit initializer for lastKeyValue containing 256 -1's, get rid of the initialization lines in storeLastKeyValue (lines 1722 through 1727). Looks perfect otherwise.


You are receiving this because you are subscribed to this thread.
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/pull/547#pullrequestreview-570843625", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/547#pullrequestreview-570843625", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Fix missing KeyRelease events when multiple keys are depressed. (#547)

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

OK I will do an update. Also as reminded by Tim, the index into array should probably be masked to ensure 1 -255. A KeyCode is always in that range, but there is no real guarantee that there is not some scenario in which it might be set to -1 for example, so better to be safe.


You are receiving this because you are subscribed to this thread.
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/pull/547#issuecomment-762910531", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/547#issuecomment-762910531", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Fix missing KeyRelease events when multiple keys are depressed. (#547)

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

@dtlewis290 pushed 1 commit.

  • 018c35e Initialize lastKeyValue array at compile time. For safety, mask index


You are receiving this because you are subscribed to this thread.
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/pull/547/files/92119ef98936767a29b740bf54dc8706f5cfc254..018c35e194afb7ce21ee2a7340bcd39317f7b5b4", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/547/files/92119ef98936767a29b740bf54dc8706f5cfc254..018c35e194afb7ce21ee2a7340bcd39317f7b5b4", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Fix missing KeyRelease events when multiple keys are depressed. (#547)

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

Merged #547 into Cog.


You are receiving this because you are subscribed to this thread.
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/pull/547#event-4224193809", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/547#event-4224193809", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>