Delphi FMX: How to reliably detect pressing of Return key on Android device?

前端 未结 2 1319
借酒劲吻你
借酒劲吻你 2021-01-14 23:42

given a Delphi 10.1 Berlin update 2 Firemonkey Android app and a TEdit. I like to detect when the user presses Enter while being in the TEdit.

I implemented an OnTy

相关标签:
2条回答
  • 2021-01-15 00:18

    You can also use TEdit.OnChangeTracking event, that occurs when typing individual characters into the edit control. Or OnExit event

    0 讨论(0)
  • 2021-01-15 00:33

    Here is a working solution: http://www.danielespinetti.it/2017/03/intercept-keyevent-on-android-with.html

    I had issues with the memo when trying it out, but after I added a TEdit to the form and tested with that one (as I wanted to use a TEdit anyhow) it worked on the LG L50. Further tests on other devices need to be carried out, but since that was the not functioning device...

    Interestingly the hardware key used to show the list of open apps (the most right one) was detected as 0x12.

    0 讨论(0)
提交回复
热议问题