For OSX both `delete` and `backspace` keys have the same scanCode (`51`) for keyDown event, while different for keystroke and keyUp events:
Backspace: ``` down - #(2 2083375 51 1 0 0 0 1) stroke - #(2 2083375 8 0 0 8 0 1) up - #(2 2083464 51 2 0 0 0 1) ```
Delete: ``` down - #(2 2114468 51 1 0 0 0 1) stroke - #(2 2114468 127 0 0 127 0 1) up - #(2 2114510 117 2 0 0 0 1) ```
I don't understand this code; I think John McIntosh is the author. But I would suspect this from platforms/iOS/vm/OSX/sqSqueakOSXApplication+events.m in recordCharEvent:, which appears to me to be the only place where a different charCode for the keyUp could be produced.
if (i > 1 || !mainView.lastSeenKeyBoardStrokeDetails) { evt.pressCode = EventKeyUp; evt.charCode = keyCodeRemembered; evt.utf32Code = 0; [self pushEventToQueue: (sqInputEvent *) &evt]; }
Specifically this would appear to prevent the first key stroke from being pushed to the queue (i > 1, and pushEventToQueue:). But the management of lastSeenKeyBoardStrokeDetails is complex and I've not analyzed it. And what I don't understand is where the EventKeyUp event is generated if i = 0.
vm-dev@lists.squeakfoundation.org