Bert Freudenberg uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-ael.643.mcz
==================== Summary ====================
Name: Kernel-ael.643 Author: ael Time: 19 October 2011, 4:09:37.67 pm UUID: 1fb9163b-7fc4-7946-a812-27626936cc50 Ancestors: Kernel-nice.642
Proposed change for enabling both Yellow and Blue buttons from a two-button mouse in Cog VM
=============== Diff against Kernel-nice.642 ===============
Item was changed: ----- Method: EventSensor>>processEvent: (in category 'private-I/O') ----- processEvent: evt "Process a single event. This method is run at high priority." + | type buttons | - | type | type := evt at: 1. "Tackle mouse events first" type = EventTypeMouse + ifTrue: [buttons := (ButtonDecodeTable at: (evt at: 5) + 1). + evt at: 5 put: (Smalltalk platformName = 'Mac OS' + ifTrue: [ buttons ] + ifFalse: [ self mapButtons: buttons modifiers: (evt at: 6) ]). - ifTrue: [evt - at: 5 - put: (ButtonDecodeTable at: (evt at: 5) - + 1). self queueEvent: evt. self processMouseEvent: evt . ^self]. "Store the event in the queue if there's any" type = EventTypeKeyboard ifTrue: [ "Check if the event is a user interrupt" ((evt at: 4) = 0 and: [((evt at: 3) bitOr: (((evt at: 5) bitAnd: 8) bitShift: 8)) = interruptKey]) ifTrue: ["interrupt key is meta - not reported as event" ^ interruptSemaphore signal]. "Else swap ctrl/alt keys if neeeded. Look at the Unicode char first, then ascii." KeyDecodeTable at: {evt at: 6. evt at: 5} ifPresent: [:a | evt at: 6 put: a first; at: 5 put: a second]. KeyDecodeTable at: {evt at: 3. evt at: 5} ifPresent: [:a | evt at: 3 put: a first; at: 5 put: a second]. self queueEvent: evt. self processKeyboardEvent: evt . ^self ]. "Handle all events other than Keyborad or Mouse." self queueEvent: evt. !
packages@lists.squeakfoundation.org