I put the following halt in HandMorph>>#handleEvent:
        anEvent isKeyboard ifTrue: [Transcript show: anEvent printString, '
keyChar: ', anEvent keyCharacter asString, ' keyValue: ', anEvent keyValue
asString; cr].

Then I typed 'hi' in a Workspace and hit Cmd+a. Look at the weird Transcript
output...
[keyDown ''] keyChar:  keyValue: 4
[keystroke 'h'] keyChar: h keyValue: 104
[keyUp ''] keyChar:  keyValue: 4
[keyDown ''] keyChar:  keyValue: 34
[keystroke 'i'] keyChar: i keyValue: 105
[keyUp ''] keyChar:  keyValue: 34
[keyDown '<Cmd->'] keyChar:  keyValue: 0
[keystroke '<Cmd-a>'] keyChar: a keyValue: 97
[keyUp '<Cmd->'] keyChar:  keyValue: 0

It seems the keyUp/Downs do not have the correct charCode and the keyValue
is different than the keystroke for the same key. What's going on here?



-----
Cheers,
Sean
--
View this message in context: 
http://forum.world.st/Keyboard-Event-Weirdness-tp4737056.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.

Reply via email to