As I said in my question I tried subclassing both, I ended up including the code that subclassed UIKeyInput because it causes insertText to be called (as you expected).
Also unmarkText gets called if the user hits the cancel button, so that doesn't distinguish between the user inserting and cancelling. Is there some way to tell the difference between those use cases?