TMSFNCTouchKeyboard - how to not lost focus of control

Hello!

I am using the TMSFNCTouchKeyboard component in my application.
There is a main application (main form) and I put the TMSFNCTouchKeyboard component on an own form (keyboard form).

When I now call the keyboard form from the main form I always lost focus and therefore the pressed keys on the keyboard form will not reach the current focused control on the main form.

How can i use this properly?

Greetings,
/Werner

Hi,

Have you considered trying TTMSFNCPopupTouchKeyboard instead? It should handle the focusing properly.

Hello,
sure I started with the popup version.
But there are too many errors/bugs in this component.

  1. Closing popup-windows crashes application
  2. Staydown-keys e.g. Shift, Ctrl, .. are not displayed in a different color
  3. Resizing of popup-keyboard not possible
  4. When focus is on button, text of button will be changed when pressing keys on keyboard!?
  5. Very limited settings possible - e.g. no key definitions

I only would need one (more) basic function in the TMSFNCTouchKeyboard component - defining the focused element before sending the key value (when focused control is on another form).

Br,
/Werner

Hi,

1: We applied a fix which will be released with the next update.

2 and 5: We've changed the exposed Keyboard property of TTMSFNCPopupTouchKeyboard to the correct type (TTMSFNCCustomTouchKeyboard → TTMSFNCTouchKeyboard). This gives you access to the keyboard control that is hosted by a popup so you can set the properties programmatically to your liking.

3: We need more time to investigate the possibilities.

4: Fixed.

As for the function request: This is unfortunately not straightforward. We let the OS API do the work, and for some supported platforms there's no option to define the target handle. However, we can add an OnBeforeKeyDown event that would be triggered before sending any key events to the target handle. That would give you an option to change the focus to another element.