//
// GJKeybindManager::chordToString from 0xc0b05c to 0xc0b380 (804 bytes)
//
// 4 xrefs:
// > KeybindingsLayer::actionsToShow @ 0x995dc4
// > KeybindingsLayer::buildContentForTab @ 0x9968d4
// > KeybindCapturePopup::updateChordDisplay @ 0xcf70e4
// > ??> @ 0xf7a08
//
// 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:54 +0000
//
_QWORD *__usercall GJKeybindManager::chordToString@(GJKeybindManager *this@, _QWORD *a2@)
{
int v2; // w19
cocos2d::CCDirector *v4; // x0
char *v5; // x1
__int64 v6; // x0
__int64 v7; // x0
*a2 = 0;
v2 = (int)this;
a2[1] = 0;
a2[2] = 0;
if ( ((unsigned int)this & 0x10000) == 0 )
{
if ( ((unsigned int)this & 0x20000) == 0 )
goto LABEL_3;
LABEL_11:
std::string::append((__int64)a2, "Alt+");
if ( (v2 & 0x40000) == 0 )
goto LABEL_4;
goto LABEL_12;
}
std::string::append((__int64)a2, "Ctrl+");
if ( (v2 & 0x20000) != 0 )
goto LABEL_11;
LABEL_3:
if ( (v2 & 0x40000) == 0 )
goto LABEL_4;
LABEL_12:
std::string::append((__int64)a2, "Shift+");
LABEL_4:
v4 = (cocos2d::CCDirector *)((unsigned int)(unsigned __int16)v2 - 1001);
if ( (unsigned int)v4 > 0x2B )
{
v6 = cocos2d::CCDirector::sharedDirector(v4);
v7 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 192LL))(v6);
v5 = (char *)cocos2d::CCKeyboardDispatcher::keyToString(v7, (unsigned __int16)v2);
if ( !v5 )
v5 = "?";
}
else
{
switch ( (__int16)v2 )
{
case 1002:
v5 = "C2A";
break;
case 1003:
v5 = "CB";
break;
case 1004:
v5 = "C2B";
break;
case 1005:
v5 = "CY";
break;
case 1006:
v5 = "C2Y";
break;
case 1007:
v5 = "CX";
break;
case 1008:
v5 = "C2X";
break;
case 1009:
v5 = "CStart";
break;
case 1010:
v5 = "C2Start";
break;
case 1011:
v5 = "CBack";
break;
case 1012:
v5 = "C2Back";
break;
case 1013:
v5 = "CRB";
break;
case 1014:
v5 = "C2RB";
break;
case 1015:
v5 = "CLB";
break;
case 1016:
v5 = "C2LB";
break;
case 1017:
v5 = "CRT";
break;
case 1018:
v5 = "C2RT";
break;
case 1019:
v5 = "CLT";
break;
case 1020:
v5 = "C2LT";
break;
case 1021:
v5 = "CUp";
break;
case 1022:
v5 = "C2Up";
break;
case 1023:
v5 = "CDown";
break;
case 1024:
v5 = "C2Down";
break;
case 1025:
v5 = "CLeft";
break;
case 1026:
v5 = "C2Left";
break;
case 1027:
v5 = "CRight";
break;
case 1028:
v5 = "C2Right";
break;
case 1029:
v5 = "CLUp";
break;
case 1030:
v5 = "C2LUp";
break;
case 1031:
v5 = "CLDown";
break;
case 1032:
v5 = "C2LDown";
break;
case 1033:
v5 = "CLLeft";
break;
case 1034:
v5 = "C2LLeft";
break;
case 1035:
v5 = "CLRight";
break;
case 1036:
v5 = "C2LRight";
break;
case 1037:
v5 = "CRUp";
break;
case 1038:
v5 = "C2RUp";
break;
case 1039:
v5 = "CRDown";
break;
case 1040:
v5 = "C2RDown";
break;
case 1041:
v5 = "CRLeft";
break;
case 1042:
v5 = "C2RLeft";
break;
case 1043:
v5 = "CRRight";
break;
case 1044:
v5 = "C2RRight";
break;
default:
v5 = "CA";
break;
}
}
std::string::append((__int64)a2, v5);
return a2;
}