开发者

Button with keyboard input via Input Method Kit

开发者 https://www.devze.com 2022-12-15 01:46 出处:网络
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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号