Search code examples
androiddelphikeyboardfiremonkey

Simulating keypress in FMX application


Is there a possibility when you enter a TMemo the first thing that automatically will be done is the key press of the Delete key? I've read about the SendInput() procedure, but I made a big mess of it, so that's why I am asking this question.

First time for me to make this in an app. The app runs on Android.


Solution

  • You could checkout kbmFMX Pro which contains a virtual keyboard that will work with existing controls.

    It is rather complex in Firemonkey to create a virtual keyboard and simulate key presses and involves getting access to TTextService and other features of Firemonkey.

    If on Windows only, you can send windows messages to the window for key down and key up, but that is also relatively complex when simulating control/shift/alt keys.