Button with keyboard input via Input Method Kit
I am creating a virtual keyboard for my application via Input Method Kit (IMK).
However I am not able to simulate a keyboard event by pressing a button.
开发者_如何学GoIs there any library I can used for keyboard event simulation?
Are there any reference materials/solutions for this problem?
See the IMKTextInput Protocol Reference, you need to call insertText:replacementRange:
[client insertText:text replacementRange:NSMakeRange(NSNotFound, NSNotFound)];
where text
is an instance of NSString
.
精彩评论