[etoys-dev] Etoys: Morphic-bf.85.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Mar 9 12:05:03 EST 2012


Bert Freudenberg uploaded a new version of Morphic to project Etoys:
http://source.squeak.org/etoys/Morphic-bf.85.mcz

==================== Summary ====================

Name: Morphic-bf.85
Author: bf
Time: 9 March 2012, 6:03:22 pm
UUID: c3cb7ef1-2144-43f0-bb6e-706023000377
Ancestors: Morphic-kfr.84

- fix keyboard up/down interpreter logic

=============== Diff against Morphic-kfr.84 ===============

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 |
  	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.
  	type = #keystroke
  		ifTrue: [keyValue := (self keyboardInterpreter nextCharFrom: Sensor firstEvt: evtBuf) asInteger]
+ 		ifFalse: [keyValue := self keyboardInterpreter keycodeFor: evtBuf third].
- 		ifFalse: [keyValue := evtBuf third].
  	^ KeyboardEvent new
  		setType: type
  		buttons: buttons
  		position: self position
  		keyValue: keyValue
  		hand: self
  		stamp: stamp.
  !



More information about the etoys-dev mailing list