In the VM code, all three are generated in sequence by the segment below.

So, yes, it is an unholy mess.
The real key taken inside Pharo is the macRomanCharacter getting translated
in the lookupString thing.
The KeyDown and KeyUp events are holding the evt.charCode, whatever this
happens to be.


The file is sqSqueakOSXApplication+events.m in platforms\iOS\vm\OSX

My current machine here is a Win8 box and I am on the move, so, no way to
test at the moment.

NSString *lookupString = [[NSString alloc] initWithCharacters: &unicode
length: 1];
 [lookupString getBytes: &macRomanCharacter maxLength: 1 usedLength: NULL
encoding: NSMacOSRomanStringEncoding
   options: 0 range: picker remainingRange: NULL];
 [lookupString release];

evt.pressCode = EventKeyDown;
unsigned short keyCodeRemembered = evt.charCode;
 evt.utf32Code = 0;
evt.reserved1 = 0;
evt.windowIndex = (int)[[mainView windowLogic] windowIndex];
 [self pushEventToQueue: (sqInputEvent *)&evt];
 evt.charCode = macRomanCharacter;
 evt.pressCode = EventKeyChar;
evt.modifiers = evt.modifiers;
 evt.utf32Code = unicode;
 [self pushEventToQueue: (sqInputEvent *) &evt];
 if (i > 1 || ![mainView lastSeenKeyBoardStrokeDetails]) {
evt.pressCode = EventKeyUp;
 evt.charCode = keyCodeRemembered;
evt.utf32Code = 0;
[self pushEventToQueue: (sqInputEvent *) &evt];
 }

I've attached the file so you can see it in its full glory. It is indeed
very peculiar

Regards,
Phil




On Wed, Jan 15, 2014 at 9:53 PM, Sean P. DeNigris <[email protected]>wrote:

> philippeback wrote
> > Which platform are you on?
>
> Mac 10.8.5
>
>
>
> -----
> Cheers,
> Sean
> --
> View this message in context:
> http://forum.world.st/Keyboard-Event-Weirdness-tp4737056p4737075.html
> Sent from the Pharo Smalltalk Developers mailing list archive at
> Nabble.com.
>
>

Attachment: sqSqueakOSXApplication+events.m
Description: Binary data

Reply via email to