You might want to try subclassing UIApplication and overriding sendEvent:it to find out what events are going on there. Given that UIEvent does not document support for keyboard events in iOS (unlike NSEvent in AppKit), I am skeptical that you will see keyboard events ... but it's worth a try. I don't have a BT keyboard to try it myself.
To use the UIApplication subclass, edit main.mand pass your subclass as the third argument to UIApplicationMain:
int main(int argc, char *argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, YourApplicationSubclass, nil);
[pool release];
return retVal;
}
This strategy is not uncommon for Cocoa desktop applications, and is also explained here:
http://cocoawithlove.com/2009/05/intercepting-status-bar-touches-on.html
source
share