trufflesqueak icon indicating copy to clipboard operation
trufflesqueak copied to clipboard

Incorrect keyboard handling on Windows

Open LinqLover opened this issue 3 years ago • 9 comments

So far, I stumbled upon the following keyboard gestures that are currently not supported in Windows:

  • [ ] Alt + <letter> (e.g., for print it, do it, etc.)
  • [ ] Alt + Shift + <letter> (e.g., for debug it, preferences, etc.)
  • [ ] Alt + . or Ctrl + . for interrupt
  • [ ] Qwertz layout specific:
    • [ ] ^ , (to type a ^)
    • [ ] Ctrl + Alt + ß for \ and the analogous shortcuts for {, [, ], }, |
  • [ ] Alt + Home or Alt + End for navigation
  • [ ] Just pressing Alt should not set the keyboard focus to the window bar menu of the VM

LinqLover avatar May 25 '22 15:05 LinqLover

Are you sure Alt is not accidentally mapped to something else, like the Win key?

fniephaus avatar May 25 '22 16:05 fniephaus

Pressing Alt + P has the same effect as pressing just P. Every key that is pressed together with Ctrl + Alt or AltGr is completely ignored. Windows shortcuts work as usual.

By the way, there are further weird things going on. This is how the keyboard exerciser looks like after typing aA1:

image image

Typing p even raises an error because the keyCode 112 is not registered in the virtualKeyTable. It's interesting that simple typing in text editors still works at all. :-)

keyDowns look no better:

image

LinqLover avatar May 25 '22 17:05 LinqLover

The root cause for all of this is that the OpenSmalltalkVM provides different events on different platforms and because of this, Squeak has covered this up on the image side. TruffleSqueak is very consistent because it's using Java AWT/Swing but that breaks on the image level. I guess you can tell that I don't use Windows much myself. Any contributions that makes this better are more than welcome. The KeyboardListener is actually quite simple: https://github.com/hpi-swa/trufflesqueak/blob/a068eca13ca09ac1de50bc4572dd53333fab8718/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/io/SqueakKeyboard.java#L15-L73

fniephaus avatar May 25 '22 17:05 fniephaus

Thanks for the pointers. So I'm no longer confused that most of these shortcuts do not work in WSL/VcXsrv either. If the problem might be on the image side, I'll also talk with @marceltaeumel about it. :-)

LinqLover avatar May 25 '22 17:05 LinqLover

We once thought about letting TruffleSqueak always prepend to run on Linux because of this. But then you of course run into many other problems (e.g., when trying to access the file system with the wrong delimiters).

fniephaus avatar May 25 '22 17:05 fniephaus

Hm ... maybe we should introduce a new "omniplatform" type on the image side? SqueakJS might benefit from that as well.

LinqLover avatar May 25 '22 17:05 LinqLover

Yes, that'd be nice!

fniephaus avatar May 25 '22 17:05 fniephaus

FWIW, I just pushed https://github.com/hpi-swa/trufflesqueak/commit/8b03140335672a5318b00caa6796d3775ba82ff6 which also seems to fix some of the other items on your list.

fniephaus avatar Dec 17 '23 23:12 fniephaus

Great!


From: Fabio Niephaus @.> Sent: Monday, December 18, 2023 12:09:10 AM To: hpi-swa/trufflesqueak @.> Cc: Christoph Thiede @.>; Author @.> Subject: Re: [hpi-swa/trufflesqueak] Incorrect keyboard handling on Windows (Issue #160)

FWIW, I just pushed 8b03140https://github.com/hpi-swa/trufflesqueak/commit/8b03140335672a5318b00caa6796d3775ba82ff6 which also seems to fix some of the other items on your list.

— Reply to this email directly, view it on GitHubhttps://github.com/hpi-swa/trufflesqueak/issues/160#issuecomment-1859316726, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJH4PSUAHVLZ4KXL35ONIKDYJ53RNAVCNFSM5W5R4U72U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBVHEZTCNRXGI3A. You are receiving this because you authored the thread.Message ID: @.***>

LinqLover avatar Dec 18 '23 01:12 LinqLover