Matthew Fulmer uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mtf.500.mcz==================== Summary ====================
Name: Morphic-mtf.500
Author: mtf
Time: 28 December 2010, 7:58:47.008 pm
UUID: 7702a744-49a7-da43-9b78-327ca3ebb44d
Ancestors: Morphic-mtf.499
import from croquet:
Name: Morphic-ar.17
Author: ar
Time: 12 July 2006, 5:15:21 pm
UUID: 9c5d68d2-b8bc-4940-816e-6e136c040ec7
Ancestors: Morphic-ar.16
- keep mouse button information in keyboard events
=============== Diff against Morphic-mtf.499 ===============
Item was changed:
----- Method: HandMorph>>generateKeyboardEvent: (in category 'private events') -----
generateKeyboardEvent: evtBuf
"Generate the appropriate mouse event for the given raw event buffer"
| buttons modifiers type pressType stamp char |
stamp := evtBuf second.
stamp = 0 ifTrue: [stamp := Time millisecondClockValue].
pressType := evtBuf fourth.
pressType = EventKeyDown ifTrue: [type := #keyDown].
pressType = EventKeyUp ifTrue: [type := #keyUp].
pressType = EventKeyChar ifTrue: [type := #keystroke].
modifiers := evtBuf fifth.
+ buttons := (modifiers bitShift: 3) bitOr: (lastMouseEvent buttons bitAnd: 7).
- buttons := modifiers bitShift: 3.
char := self keyboardInterpreter nextCharFrom: Sensor firstEvt: evtBuf.
^ KeyboardEvent new
setType: type
buttons: buttons
position: self position
keyValue: char asciiValue
hand: self
stamp: stamp.
!