[squeak-dev] The Trunk: ST80-mt.292.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Mar 24 12:24:11 UTC 2023


Marcel Taeumel uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-mt.292.mcz

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

Name: ST80-mt.292
Author: mt
Time: 24 March 2023, 1:24:10.732707 pm
UUID: eb3f25f5-6b72-7e49-b789-78be7f567c5e
Ancestors: ST80-mt.291

Complement Kernel-mt.1510

=============== Diff against ST80-mt.291 ===============

Item was removed:
- ----- Method: EventSensor>>characterForKeycode: (in category '*ST80-Support-keyboard') -----
- characterForKeycode: keycode
- 	"Map the given keycode to a Smalltalk character object. Encoding:
- 		A keycode is 12 bits:   <4 modifer bits><8 bit ISO character>
- 		Modifier bits are:       <command><option><control><shift>"
- 
- 	"NOTE: the command and option keys are specific to the Macintosh and may not have equivalents on other platforms."
- 
- 	keycode = nil ifTrue: [ ^nil ].
- 	keycode class = Character ifTrue: [ ^keycode ].  "to smooth the transition!!"
- 	^ Character value: (keycode bitAnd: 16rFF)!

Item was removed:
- ----- Method: EventSensor>>keyboard (in category '*ST80-Support-keyboard') -----
- keyboard
- 	"Answer the next (single-byte or multi-byte) character from the keyboard."
- 
- 	| firstCharacter secondCharactor stream multiCharacter converter |
- 	"1) Consume next character from buffer."
- 	(firstCharacter := self characterForKeycode: keyboardBuffer next) ifNil: [^ nil].
- 	
- 	"2) Peek additional character and try to read multi-byte character."
- 	(secondCharactor := self characterForKeycode: keyboardBuffer peek) ifNil: [^ firstCharacter].
- 	(converter := Locale currentPlatform systemConverter) ifNil: [^ firstCharacter].
- 	stream := ReadStream on: (String with: firstCharacter with: secondCharactor).
- 	multiCharacter := [converter nextFromStream: stream] ifError: [firstCharacter].
- 	
- 	"3) Only consume that additional character if we got a multi-byte character."
- 	multiCharacter isOctetCharacter ifFalse: [keyboardBuffer next].
- 	
- 	"4) Answer either single-byte or multi-byte character."
- 	^ multiCharacter
- !

Item was removed:
- ----- Method: EventSensor>>keyboardPressed (in category '*ST80-Support-keyboard') -----
- keyboardPressed
- 	"Answer true if keystrokes are available."
- 
- 	^self peekKeyboard notNil!

Item was removed:
- ----- Method: EventSensor>>peekKeyboard (in category '*ST80-Support-keyboard') -----
- peekKeyboard
- 	"Answer the next character in the keyboard buffer without removing it, or nil if it is empty."
- 
- 	self fetchMoreEvents.
- 	self eventQueue ifNotNil: [:queue | queue flush].
- 	^ self characterForKeycode: keyboardBuffer peek!



More information about the Squeak-dev mailing list