//
// cocos2d::CCLayer::keyDown from 0x1800504f0 to 0x180050528 (56 bytes)
//
// 8 xrefs:
// > ??> @ 0x1800ed378
// > ??> @ 0x1800ed838
// > ??> @ 0x1800edd88
// > ??> @ 0x1800ee360
// > ??> @ 0x1800ee8b0
// > ??> @ 0x1800f7190
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b1fbc
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall cocos2d::CCLayer::keyDown(cocos2d::CCLayer *this, enum cocos2d::enumKeyCodes a2, double a3)
{
struct cocos2d::CCDirector *v3; // rax
cocos2d::CCKeypadDispatcher *v4; // rax
if ( a2 == KEY_Escape || a2 == CONTROLLER_B )
{
v3 = cocos2d::CCDirector::sharedDirector();
v4 = (cocos2d::CCKeypadDispatcher *)((__int64 (__fastcall *)(struct cocos2d::CCDirector *))v3->getKeypadDispatcher)(v3);
cocos2d::CCKeypadDispatcher::dispatchKeypadMSG(v4, kTypeBackClicked);
}
}