Recent

Author Topic: LAMW question: how to exit after intercepting (and muting) KEYCODE_BACK  (Read 944 times)

Manlio

  • Full Member
  • ***
  • Posts: 162
  • Pascal dev
I understand that in OnSpecialKeyDown we can intercept the Back button press (if keyCodeString = 'KEYCODE_BACK')  and cancel it (mute := True).

In that situation the app will not close, the form will remain open, OnCloseQuery, OnClose, etc. will not be called and the app will continue running normally.

However, I would like that after the above Back key is pressed, the app should disappear as if the Home key had been pressed. By that I mean that the app should continue running (well, actually it will be paused) but free the screen as if Home was pressed.

So, after cancelling Back, What command do I have to execute to achieve that?
manlio mazzon gmail

Manlio

  • Full Member
  • ***
  • Posts: 162
  • Pascal dev
I figured out the answer: call jForm.Minimize();

Cheers
manlio mazzon gmail

jmpessoa

  • Hero Member
  • *****
  • Posts: 2297

Good!!

Thank you!!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

 

TinyPortal © 2005-2018