0

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?

pkamb
  • 33,281
  • 23
  • 160
  • 191

1 Answers1

2

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.

Gregory Pakosz
  • 69,011
  • 20
  • 139
  • 164