Hi
@AlpVir , did you try
@klaus suggestion?
You should modify the Activity_KeyPress sub in Main as showed by Erel in his solution.
Then add sub B4XPage_KeyPress in your B4xMainPage, test
keycode for the value you need (24) and run the sub you indicated (CaptureVideos)
This scheme has the benefit of giving any B4xPage the ability to run that sub (provided that page has a proper B4XPage_KeyPress sub)
Note by Erel:
And implement B4XPage_KeyPress in the relevant pages.
The back key will be handled in the CloseRequest event sub.