Etoys: Morphic-bf.85.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Etoys: Morphic-bf.85.mcz

commits-2
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.
  !

_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev