1

I'm aware of this link: No OnKeyDown event for Return key on Delphi Android 10.3.3

which @blong had given a solution in 10.3.3

Looking at the code in 10.4.1, it seems that Embarcadero had removed the ELSE block as @blong had suggested. Looks like it's possible Embarcadero monitors this forum for fixed posted by users.

EDITED: this code is from Delphi's source code in FMXEditText.java (detailed source code not included as it's Embarcadero's source).

@Override public void onEditorAction(int actionCode) { // Disable default processing logic of ReturnKey. if (actionCode == EditorInfo.IME_ACTION_DONE) { ... ... } // Delegate handle Editor action to FMX side. for (FMXTextListener listener : listeners) { listener.onEditorAction(actionCode); } } 

However, the OnKeyDown still does not work in Delphi 10.4.1

Please advise how I can get OnKeyDown to work for a TEdit in 10.4.1. iOS works fine, so it's unimaginable why would Android version be so restrictive.

Any gurus out here who knows how to over-ride the Android system?

Thanks.

4
  • He posted Java code from FMXEditText.java, which is part of the Delphi source Commented Dec 16, 2020 at 21:43
  • For what it's worth: it's an epic struggle even for Java developers: stackoverflow.com/a/24425998/3164070. It might help to know why you want to use the event, because there might be an alternate solution Commented Dec 16, 2020 at 22:02
  • I'm trying to do an internal table incremental search (which is fast anyway for incremental), and I don't want the user to have to press the 'Return' key after each keystroke. Thanks for any inputs. Commented Dec 16, 2020 at 22:14
  • @KenWhite I have edited the post to clarify it's source code from Embarcadero's source units. Commented Dec 16, 2020 at 23:00

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.