//
// EditorUI::keyDown from 0xbd6be8 to 0xbd6d28 (320 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'EditorUI::keyDown @ 0xbd6d2c
// > ??> @ 0xb7c70
// > ??> @ 0x14371d8
//
// 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 13:03:40 +0000
//
__int64 __fastcall EditorUI::keyDown(__int64 result, int a2, long double a3)
{
GJRotationControl **v3; // x19
char v4; // w0
long double v5; // q0
char v6; // w0
long double v7; // q0
char v8; // w0
char hasActiveInput; // w0
long double v11; // [xsp+20h] [xbp+20h]
v3 = (GJRotationControl **)result;
if ( a2 == 27 )
{
v4 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(result + 784) + 352LL))(*(_QWORD *)(result + 784));
v5 = a3;
if ( v4 && (v8 = GJScaleControl::hasActiveInput(v3[98]), v5 = a3, v8) )
{
return GJScaleControl::releaseInputFocus(v3[98]);
}
else
{
v11 = v5;
v6 = (*(__int64 (__fastcall **)(GJRotationControl *))(*(_QWORD *)v3[95] + 352LL))(v3[95]);
v7 = v11;
if ( v6 && (hasActiveInput = GJRotationControl::hasActiveInput(v3[95]), v7 = v11, hasActiveInput) )
return GJRotationControl::releaseInputFocus(v3[95]);
else
return (*((__int64 (__fastcall **)(GJRotationControl **, __int64, __int64, long double))*v3 + 164))(
v3,
20067,
1,
v7);
}
}
else if ( a2 == 13 )
{
if ( !(*(unsigned __int8 (__fastcall **)(_QWORD))(**(_QWORD **)(result + 784) + 352LL))(*(_QWORD *)(result + 784))
|| (result = (unsigned __int8)GJScaleControl::applyFocusedInput(v3[98]), !(_BYTE)result) )
{
result = (*(unsigned __int8 (__fastcall **)(GJRotationControl *))(*(_QWORD *)v3[95] + 352LL))(v3[95]);
if ( (_BYTE)result )
return GJRotationControl::applyFocusedInput(v3[95]);
}
}
return result;
}