[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Cross-platform differences for CTRL keys (#456)

Nicolas Cellier notifications at github.com
Thu Dec 26 00:39:09 UTC 2019


Note: linux behavior is not strange, it is deliberate, see this:
https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/a4a08f98c17b23ad54b5e361ffc0280e2ea8e0c3/platforms/unix/vm-display-X11/sqUnixX11.c#L2065

It was introduced with https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/1b837f94e96b93cb4d117ccdd010825d76dcde57

If we want to fix it, we can just enclose this piece of code with `#ifdef PharoVM`, as it is already the case for similar code on windows:
https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/a4a08f98c17b23ad54b5e361ffc0280e2ea8e0c3/platforms/win32/vm/sqWin32Window.c#L1308

Though, on windows, only the `utf32` field (`event at: 6`) is changed, while on linux `charCode` field (`event at: 3`) is also changed.

I do not see equivalent code on OSX...

However, I suggest deeper change, as in this branch:
https://github.com/OpenSmalltalk/opensmalltalk-vm/tree/Nuke-MacRoman

We should have `charCode` transformed into a platform independent `keyCode`, hence not being an ASCII control character, but rather a letter in case of Ctrl+a. (X11 KeySym and windows Virtual Key codes already match ASCII for keys representing ASCII characters).

Then the utf32 can eventually be the ASCII control character or not, whatever we want, we have to decide...



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/456#issuecomment-568941350
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20191225/9601ca23/attachment.html>


More information about the Vm-dev mailing list