Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1609.mcz==================== Summary ====================
Name: Morphic-mt.1609
Author: mt
Time: 17 December 2019, 12:00:26.280485 pm
UUID: 0b40ea06-1636-2a4b-b28a-a1a284d7730f
Ancestors: Morphic-mt.1608
Fixes the debugging output of keyboard events.
Do not print the key character for key up/down anymore because those are just low-level, platform-dependent key codes in our current OpenSmalltalk VM.
Only for key-stroke events, print those characters because those are platform independent.
=============== Diff against Morphic-mt.1608 ===============
Item was changed:
----- Method: HandMorph>>showEvent: (in category 'events-debugging') -----
showEvent: anEvent
"Show details about the event on the display form. Useful for debugging."
| message borderWidth |
ShowEvents == true ifFalse: [^ self].
borderWidth := 5.
message := String streamContents: [:strm |
strm
nextPutAll: '[HandMorph >> #showEvent:]'; cr;
nextPutAll: 'event'; tab; tab; tab; tab; nextPutAll: anEvent printString; cr;
+ nextPutAll: 'keyboard focus'; tab; tab; nextPutAll: self keyboardFocus printString; cr;
- nextPutAll: 'keyboard focus'; tab; nextPutAll: self keyboardFocus printString; cr;
nextPutAll: 'mouse focus'; tab; tab; nextPutAll: self mouseFocus printString].
message := message asDisplayText
foregroundColor: Color black
backgroundColor: Color white.
"Offset to support multiple hands debugging."
Display fill: (0 @ 0 extent: message form extent + (borderWidth asPoint * 2)) rule: Form over fillColor: Color white.
message displayOn: Display at: borderWidth asPoint + (0 @ ((owner hands indexOf: self) - 1 * message form height)).!
Item was changed:
----- Method: KeyboardEvent>>printOn: (in category 'printing') -----
printOn: aStream
"Print the receiver on a stream"
aStream nextPut: $[.
aStream nextPutAll: self cursorPoint printString; space.
+ aStream nextPutAll: type; space.
+
+ self isKeystroke ifTrue: [
+ aStream nextPutAll: ''''.
+ self printKeyStringOn: aStream.
+ aStream nextPut: $'; space].
+
- aStream nextPutAll: type; nextPutAll: ' '''.
- self printKeyStringOn: aStream.
- aStream nextPut: $'; space.
aStream nextPut: $(.
aStream nextPutAll: keyValue printString.
aStream nextPut: $); space.
+
aStream nextPutAll: timeStamp printString.
aStream nextPut: $]!