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

Nicolas Cellier notifications at github.com
Thu Dec 26 13:57:19 UTC 2019

Hi Guile,
I think that we can find an agreement. X11 KeySym looks like the best choice to me, and I would like to use that in (event at: 3). Apart the arrow, prior, next, home, end, BS, delete, insert, Escape, Tab that we already map to some ASCII control character in a platform independent manner (breaking compatibility on those might be a pain).

Note that the squeak is using `keystroke` in lower event level, and OSVM is using `EventKeyChar`, when a character is produced (not just a key pressed).
Shortcuts should probably be handled at EventKeyDown like it usually is on various OSes (that's the windows recommended way). We can as well connect Morphic keyPressed: to event keydown if we want to, not too difficult.

Note that we also have unused slots (reserved1) in keyboard events, and I thought that we could use that to transfer OS dependent keyCode. This way, we could experiment both image side handling, and VM side handling of more complex events (composition etc...). Also, we would preserve a smooth transition without complete locked in syndrome.

Note that even for occidental languages, I'm not satisfied with linux handling of dead keys (^ ยจ `) at VM side, I get decomposed unicode while the image rather expect precomposed (we can change the image for simple thing like that, but it's lot more work for more complex cases like you have shown).

So IMO, OSVM should provide:
- a platform independent keycode in (event at: 3)
- utf32 (ucs4) character in (event at: 6) at least for EventKeyChar
- a platform dependent keycode (reserved1 - to be renamed) for image side experiments
There can be keydown events without corresponding keychar event.
There can be several consecutive keychar events following a single keydown event.
There can be keydown/keychar events without keyup event for repeated keys, and the OSVM should take repeat count of keys into account! (pass that in some unused event field too...).

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/20191226/f5613014/attachment.html>

More information about the Vm-dev mailing list