[OpenSmalltalk/opensmalltalk-vm] No distinction between #delete and #backspace OSX Keydown events (#363)

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

[OpenSmalltalk/opensmalltalk-vm] No distinction between #delete and #backspace OSX Keydown events (#363)

Fabio Niephaus-3
 

For OSX both delete and backspace keys have the same scanCode (51) for keyDown event, while different for keystroke and keyUp events:

Backspace:

down - #(2 2083375 51 1 0 0 0 1)
stroke - #(2 2083375 8 0 0 8 0 1)
up - #(2 2083464 51 2 0 0 0 1)

Delete:

down - #(2 2114468 51 1 0 0 0 1)
stroke - #(2 2114468 127 0 0 127 0 1)
up - #(2 2114510 117 2 0 0 0 1)


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/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/OpenSmalltalk/opensmalltalk-vm","title":"OpenSmalltalk/opensmalltalk-vm","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"No distinction between #delete and #backspace OSX Keydown events (#363)"}],"action":{"name":"View Issue","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/363"}}}</script> <script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/363", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/363", "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] No distinction between #delete and #backspace OSX Keydown events (#363)

Fabio Niephaus-3
 

I don't understand this code; I think John McIntosh is the author. But I would suspect this from platforms/iOS/vm/OSX/sqSqueakOSXApplication+events.m in recordCharEvent:, which appears to me to be the only place where a different charCode for the keyUp could be produced.

    if (i > 1 || !mainView.lastSeenKeyBoardStrokeDetails) {
        evt.pressCode = EventKeyUp;
        evt.charCode = keyCodeRemembered;
        evt.utf32Code = 0;
        [self pushEventToQueue: (sqInputEvent *) &evt];
    }

Specifically this would appear to prevent the first key stroke from being pushed to the queue (i > 1, and pushEventToQueue:). But the management of lastSeenKeyBoardStrokeDetails is complex and I've not analyzed it. And what I don't understand is where the EventKeyUp event is generated if i = 0.


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/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/OpenSmalltalk/opensmalltalk-vm","title":"OpenSmalltalk/opensmalltalk-vm","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm"}},"updates":{"snippets":[{"icon":"PERSON","message":"@eliotmiranda in #363: I don't understand this code; I think John McIntosh is the author. But I would suspect this from platforms/iOS/vm/OSX/sqSqueakOSXApplication+events.m in recordCharEvent:, which appears to me to be the only place where a different charCode for the keyUp could be produced.\r\n\r\n if (i \u003e 1 || !mainView.lastSeenKeyBoardStrokeDetails) {\r\n evt.pressCode = EventKeyUp;\r\n evt.charCode = keyCodeRemembered;\r\n evt.utf32Code = 0;\r\n [self pushEventToQueue: (sqInputEvent *) \u0026evt];\r\n }\r\n\r\nSpecifically this would appear to prevent the first key stroke from being pushed to the queue (i \u003e 1, and pushEventToQueue:). But the management of lastSeenKeyBoardStrokeDetails is complex and I've not analyzed it. And what I don't understand is where the EventKeyUp event is generated if i = 0."}],"action":{"name":"View Issue","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/363#issuecomment-458696060"}}}</script> <script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/363#issuecomment-458696060", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/363#issuecomment-458696060", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>