[squeak-dev] Please try it out | Fixing the input mapping for keystroke events

Marcel Taeumel marcel.taeumel at hpi.de
Thu Apr 22 08:41:15 UTC 2021


Hi all!

Please find attached a changeset that improves the cross-platform base for keystroke events. Please try it out and take a look at it. Report issues ASAP so that I can merge it into Trunk soon.

Thanks to Tom (tobe), the new promising idea is to replace the existing attempt:

Duplicate all control and alt keys
Duplicate control and alt keys
Swap control and alt keys

With the following preferences:

[X] Map ASCII control characters to printable characters

 - Default is TRUE
 - Only affects events that have the CONTROL modifier set (e.g. CTRL+J)
 - Rather application-specific than platform-specific
[X] Map CONTROL keys to COMMAND keys

 - Checked at image start-up
 - TRUE on Windows/Linux
 - FALSE on macOS
[X] Map ALT keys to OPTION keys
 - Checked at image start-up
 - TRUE on Windows/Linux
 - FALSE on macOS (bc. ALT==CMD on recent Linux/Windows VMs)

Please take a look at KeyboardEvent >> #checkCommandKey to learn about the fundamental trade-off we have solved.

Please try out your preferred applications. Feel free to add logging to HandMorph >> #logEvent: for more convenient testing:

(anEvent isKeyboard and: [anEvent isKeystroke])
   ifTrue: [Transcript showln: anEvent].

Thanks!

Best,
Marcel (and Tom)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210422/3a932b83/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: key-mapping.5.cs
Type: application/octet-stream
Size: 19803 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210422/3a932b83/attachment.obj>


More information about the Squeak-dev mailing list