Button with keyboard input via Input Method Kit

290 Views Asked by At

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.

Is there any library I can used for keyboard event simulation?

Are there any reference materials/solutions for this problem?

1

There are 1 best solutions below

0
Gregory Pakosz On

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.