Updates:
        Status: FixProposed

Comment #11 on issue 1064 by marianopeck: There are still problem with keyboard shortcuts in Windows
http://code.google.com/p/pharo/issues/detail?id=1064

from tn..


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,


Reply via email to