#include #include extern "C" void TweakInitialize() { if (Class star = objc_getClass("UIKeyboardLayoutStar")) if (Method method = class_getInstanceMethod(objc_getClass("UIKeyboardLayoutRoman"), @selector(handleHardwareKeyDownFromSimulator:))) class_addMethod(star, @selector(handleHardwareKeyDownFromSimulator:), method_getImplementation(method), method_getTypeEncoding(method)); }