[squeak-dev] The Trunk: Morphic-bf.581.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Sep 29 18:16:51 UTC 2011
Bert Freudenberg uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-bf.581.mcz
==================== Summary ====================
Name: Morphic-bf.581
Author: bf
Time: 29 September 2011, 11:14:17.625 am
UUID: 65441674-ca6b-4ad5-8a86-9d163816efd7
Ancestors: Morphic-dtl.580
Fix keyDown/keyUp events. Must not be interpreted.
=============== Diff against Morphic-dtl.580 ===============
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 keyValue |
- | 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).
+ type = #keystroke
+ ifTrue: [keyValue := (self keyboardInterpreter nextCharFrom: Sensor firstEvt: evtBuf) asInteger]
+ ifFalse: [keyValue := evtBuf third].
- char := self keyboardInterpreter nextCharFrom: Sensor firstEvt: evtBuf.
^ KeyboardEvent new
setType: type
buttons: buttons
position: self position
+ keyValue: keyValue
- keyValue: char asciiValue
hand: self
stamp: stamp.
!
More information about the Squeak-dev
mailing list
|