//
// Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeKeyboardEvent from 0xd81ab4 to 0xd81c0c (344 bytes)
//
// 1 xrefs:
// > ??> @ 0xe3578
//
// 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:08:10 +0000
//
unsigned __int64 __fastcall Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeKeyboardEvent(
long double a1,
__int64 a2,
__int64 a3,
int a4,
unsigned __int8 a5,
unsigned __int8 a6,
unsigned __int8 a7,
unsigned __int8 a8,
unsigned __int8 a9)
{
unsigned __int64 result; // x0
int v10; // w21
int v11; // w20
unsigned int v12; // w19
int v13; // w24
int v14; // w23
int v15; // w22
__int64 v16; // x0
cocos2d::CCKeyboardDispatcher *v17; // x25
result = (unsigned int)(a4 - 29);
v10 = a5;
v11 = a6;
v12 = a4 + 36;
v13 = a7;
v14 = a8;
v15 = a9;
if ( (unsigned int)result <= 0x19 || (result = (unsigned int)(a4 - 7), v12 = a4 + 41, (unsigned int)result <= 9) )
{
LABEL_5:
v16 = cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)result);
v17 = (cocos2d::CCKeyboardDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v16 + 192LL))(v16);
cocos2d::CCKeyboardDispatcher::updateModifierKeys(v17, v13 != 0, v14 != 0, v15 != 0, 0);
return cocos2d::CCKeyboardDispatcher::dispatchKeyboardMSG(v17, v12, v10 != 0, v11 != 0, a1);
}
else
{
switch ( a4 )
{
case 19:
v12 = 38;
goto LABEL_5;
case 20:
v12 = 40;
goto LABEL_5;
case 21:
v12 = 37;
goto LABEL_5;
case 22:
v12 = 39;
goto LABEL_5;
case 57:
case 58:
v12 = 18;
goto LABEL_5;
case 59:
case 60:
v12 = 16;
goto LABEL_5;
case 61:
v12 = 9;
goto LABEL_5;
case 62:
v12 = 32;
goto LABEL_5;
case 66:
case 160:
v12 = 13;
goto LABEL_5;
case 67:
v12 = 8;
goto LABEL_5;
case 111:
v12 = 27;
goto LABEL_5;
case 112:
v12 = 46;
goto LABEL_5;
case 113:
case 114:
v12 = 17;
goto LABEL_5;
default:
return result;
}
}
}