//
// EditorUI::keyDown from 0x100162404 to 0x100162514 (272 bytes)
//
// 2 xrefs:
// > sub_100162514 @ 0x100162518
// > ??> @ 0x10096d2d8
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 10:59:46 +0000
//
__int64 __fastcall EditorUI::keyDown(__int64 result, int a2, double a3)
{
__int64 v3; // x19
v3 = result;
if ( a2 == 13 )
{
if ( !(*(unsigned int (__fastcall **)(_QWORD))(**(_QWORD **)(result + 784) + 352LL))(*(_QWORD *)(result + 784))
|| (result = sub_100159708(*(_QWORD **)(v3 + 784)), (result & 1) == 0) )
{
result = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v3 + 760) + 352LL))(*(_QWORD *)(v3 + 760));
if ( (_DWORD)result )
return sub_100157708(*(_QWORD *)(v3 + 760));
}
}
else if ( a2 == 27 )
{
if ( (*(unsigned int (__fastcall **)(_QWORD))(**(_QWORD **)(result + 784) + 352LL))(*(_QWORD *)(result + 784))
&& (unsigned int)sub_1001596CC(*(_QWORD **)(v3 + 784)) )
{
return sub_100158E98(*(_QWORD **)(v3 + 784));
}
else if ( (*(unsigned int (__fastcall **)(_QWORD))(**(_QWORD **)(v3 + 760) + 352LL))(*(_QWORD *)(v3 + 760))
&& (unsigned int)sub_1001576F4(*(_QWORD *)(v3 + 760)) )
{
return sub_1001576D8(*(_QWORD *)(v3 + 760));
}
else
{
return (*(__int64 (__fastcall **)(__int64, __int64, __int64, double))(*(_QWORD *)v3 + 1312LL))(v3, 20067, 1, a3);
}
}
return result;
}