Tx for reporting. can you open a bug entry? Stef On Mar 3, 2011, at 10:27 AM, tn wrote:
KeyboardEvent keyValue for 'ctrl + i' is evaluated to 9 as ASCII control code, and the value conflicts to Character tab value. I tried to correct source code for this problem. Below is the workaround for Pharo-1.1.1-OneClickCogVM on Windows XP. -------------------- InputEventSensor>>processEvent:
processEvent: evt
...
"Finally keyboard" type = EventTypeKeyboard ifTrue: [ (evt at: 4)=0 ifTrue: [ "-- add --" "Sswap ctrl/alt keys if neeeded" KeyDecodeTable at: {evt at: 3. evt at: 5} ifPresent: [:a | evt at: 3 put: a first; at: 6 put: a first; "-- add --" at: 5 put: a second]. ]. "-- add --" "Update state for polling calls" modifiers := evt at: 5. ^evt]. ...
In order to work this code, Preference Control and Alt keys must be set to "Full matching". Because ASCII control characters (e.g. ^i) is mapped to character code with KeyDecodeTable, only at the time.
About key event, see InputEventFetcher class comment. And it is interesting that to contrast implementations between Pharo and Squeak4.2. Each implementation is below.
Pharo: InputEventSensor>>processEvent: Squeak4.2: EventSensor>>processEvent:
Thanks,
-- View this message in context: http://forum.world.st/Inspect-it-wrong-shortcut-tp1306494p3333001.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.