[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Adds cross-platform compatible virtual-key codes to vm-display-x11 plugin (#599)

Marcel Taeumel notifications at github.com
Tue Oct 5 07:13:42 UTC 2021

> I think that SDL or QT might have the most compatible list

SDL does in C what Squeak 6.0alpha already does in Smalltalk. Looking at "SDL_x11keyboard.c" or "scancodes_windows.h", we have in `EventSensor >> virtualKeyTable`.

Now, SDL has its own `KeySymToSDLScancode` table. In this PR, I chose to simplify matters by just converting the special keys from 0xff__ to 0x00__ plus using the room between 0x20 and 0x4f for alpha-numeric keys. So that we stay in 1 byte, just as macOS and Windows do.

Also, SDL uses a similar "hack" for alpha-numeric keys. See SDL_x11keyboard.c function "X11_KeyCodeToSDLScancode".

This PR is als complete as in can get for X11. I am currently fixing up some modifier issues when pressing only modifier keys.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20211005/74745b77/attachment.html>

More information about the Vm-dev mailing list