In TextEditor>>initializeShiftCmdKeyShortcuts the shortcuts are set in a
way that it creates three handlers for each shortcut to make it work xD.

The main difference here is that in Linux, ubuntu 11.04 the Ctrl+a comes
with the right keyCharacter, but in Windows and MacOS it does not :(.
We've tested that on host OSs with friends :).

I've captured the problem I'm experimenting so far and wrote down an ugly
hack in this method.

KeyboardEvent>>modifiedCharacter
    self flag: #hack.
    "Hack me.  When Ctrl is pressed, the key ascii value is not right and
we have to do this shit"
    ^(self controlKeyPressed and: [ (#(MacOSX Windows) includes: Smalltalk
os current platformFamily) and: [ keyValue <= 26 ]])
        ifTrue: [ (self keyValue + $a asciiValue - 1) asCharacter ]
        ifFalse: [ self keyCharacter ]


But I'd like to replace that by:

KeyboardEvent>>modifiedCharacter
    ^self keyCharacter

:P


Are there any technical reasons why the Sensor behaves like that?  How
difficult is it to make it work the same for all three vms?

Thanks!
Guille

Reply via email to