<p>Side comment 2 from <a href="http://forum.world.st/Windows-cog-vm-Keyboard-events-related-about-keycode-mapping-td4330359.html" rel="nofollow">http://forum.world.st/Windows-cog-vm-Keyboard-events-related-about-keycode-mapping-td4330359.html</a></p>
<blockquote>
<p><a class="user-mention" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=1457661" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jvuletich">@jvuletich</a>: There is a completely separated issue, and it happens both in Windows<br>
and Mac. Here, [ctrl] + [an alphabetic key] substracts 64 from the code.<br>
So, [ctrl]+[c] generates code 3. This is consistent with the traditional<br>
meaning of the ctrl key (in dumb terminals and DOS), but it makes<br>
impossible for the image to tell (for example) between [ctrl]+[Enter]<br>
and [ctrl]+[m]. The image might want to use these keystrokes for<br>
different things, so it would be much better not to substract 64 in the<br>
VM and let the image handle it. I know it could be done by handling key<br>
down and key up events, but this would also require code that is not<br>
only platform dependent but also needs to know the mapping between key<br>
codes and characters in each platform.<br>
.<br>
In general, I think that [control], [command] and [alt/option] should<br>
not affect the character code of a keystroke, they should only set the<br>
appropriate flag so the image can decide what to do with them. This is<br>
completely different for [shift], as [shift] does indeed modify the<br>
character generated.</p>
</blockquote>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/396?email_source=notifications&email_token=AIJPEW7SRQSWIN7AS557M63P2EOYRA5CNFSM4HP46HZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXQ7NNQ#issuecomment-501348022">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AIJPEW5YDNHDCNONO5WAY43P2EOYRANCNFSM4HP46HZA">mute the thread</a>.<img src="https://github.com/notifications/beacon/AIJPEWZLALN5FJ57BF4OESDP2EOYRA5CNFSM4HP46HZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXQ7NNQ.gif" height="1" width="1" alt="" /></p>
<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=AIJPEW7SRQSWIN7AS557M63P2EOYRA5CNFSM4HP46HZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXQ7NNQ#issuecomment-501348022",
"url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/396?email_source=notifications\u0026email_token=AIJPEW7SRQSWIN7AS557M63P2EOYRA5CNFSM4HP46HZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXQ7NNQ#issuecomment-501348022",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>