[squeak-dev] The Trunk: Kernel-eem.678.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Apr 18 17:30:20 UTC 2012


Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.678.mcz

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

Name: Kernel-eem.678
Author: eem
Time: 18 April 2012, 10:29:16.009 am
UUID: a1560bd8-28a8-4167-a5ae-d3da0cd21c70
Ancestors: Kernel-eem.677

Provide a kbdTest for the EventSensor.

=============== Diff against Kernel-eem.677 ===============

Item was added:
+ ----- Method: EventSensor>>kbdTest (in category 'keyboard') -----
+ kbdTest    "Sensor kbdTest"
+ 	"This test routine will print the unmodified character, its keycode,
+ 	and the OR of all its modifier bits, until the character x is typed"
+ 	| char evt |
+ 	char := nil.
+ 	[char = $x] whileFalse: 
+ 		[[(evt := self peekKeyboardEvent) isNil] whileTrue.
+ 		char := self characterForKeycode: evt third.
+ 		(String streamContents: 
+ 			[:s |
+ 			s nextPut: char.
+ 			(3 to: 8) with: 'cpmurw' do:
+ 				[:i :c|
+ 				s space; nextPut: c; nextPut: $:; print: (evt at: i); nextPutAll: '     ']])
+ 			displayAt: 10 at 10]!



More information about the Squeak-dev mailing list