//
// EditorWindowPopup::keyDown from 0x78d1da to 0x78d232 (88 bytes)
//
// 2 xrefs:
// > EmotePickerPopup::keyDown @ 0x7788b8
// > `non-virtual thunk to'EditorWindowPopup::keyDown @ 0x78d236
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:59:37 +0000
//
int __fastcall EditorWindowPopup::keyDown(int a1, int a2, int a3, int a4)
{
int result; // r0
result = EditorWindowPopup::fieldHoldsKeys((EditorWindowPopup *)a1);
if ( result )
{
*(_BYTE *)(a1 + 771) = 0;
if ( a2 == 13 )
{
return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 764))(a1);
}
else if ( a2 == 27 )
{
return EditorWindowPopup::blurField((EditorWindowPopup *)a1);
}
}
else
{
result = *(_DWORD *)(a1 + 712);
if ( result )
return (*(int (__fastcall **)(int, int, int, int))(*(_DWORD *)result + 564))(result, a2, a3, a4);
}
return result;
}