'From Squeak3.8gamma of ''24 November 2004'' [latest update: #6527] on 5 January 2005 at 5:43 pm'! "Change Set: keyboardCleanup-tpr Date: 5 January 2005 Author: tim@sumeru.stanford.edu Minor cleanup of HandMorph so it doesn't pillage EventSensor and grab the eventQueue. All the users of the modified code appear to keep working as before - menu navigation, typing etc"! !EventSensor methodsFor: 'accessing' stamp: 'tpr 1/5/2005 17:34'! peekKeyboardEvent "Return the next keyboard char event from the receiver or nil if none available" ^eventQueue nextOrNilSuchThat: [:buf | buf first = EventTypeKeyboard and: [(buf fourth) = EventKeyChar]]! ! !HandMorph methodsFor: 'event handling' stamp: 'tpr 1/5/2005 17:34'! checkForMoreKeyboard "Quick check for more keyboard activity -- Allows, eg, many characters to be accumulated into a single replacement during type-in." | evtBuf | self flag: #arNote. "Will not work if we don't examine event queue in Sensor" evtBuf := Sensor peekKeyboardEvent. evtBuf ifNil: [^nil]. ^self generateKeyboardEvent: evtBuf! !