REDIVIVUS

Proposals / #1578

Mac MSG_PostKeyMessage: void __cdecl (int32_t bKeyDown, uint8_t byKeyCode, uint8_t byCharCode)

checked · by KierTaylor · submitted 2026-11-08

There are three cdecl stack args. [EBP+8] picks the message (non-zero gives WM_KEYDOWN 0x100, zero gives WM_KEYUP 0x101, via SETZ|0x100). byte [EBP+0xc] = the Mac key code, posted as wParam|0x80000000. byte [EBP+0x10] = the char code, posted as lParam. It goes to MSG_EnqueueMessage 0x000297df. MAC_PostKeyDown 0x0019ba6e stores [ESP]=1, [ESP+4]=AH (key code) and [ESP+8]=AL (char code) from the event message, then sets AL=1 itself without reading this call's EAX.

Changes 1, applied together

  1. Set prototype mac 0x000298b2

    signatureundefined MSG_PostKeyMessage(void)→void MSG_PostKeyMessage(int32_t bKeyDown, uint8_t byKeyCode, uint8_t byCharCode)
    conventionunknown→__cdecl