How to handle iOS hardware button press?

Hello, is in JSB any function to handle iOS hardware button pressed?
Thanks for any advice!

Hi.
There are two function: applicationDidEnterBackground and applicationWillEnterForeground in AppController.mm.
they are the callback functions that triggers when iOS hardware button is pressed.
you can call your JS function in those 2 callbacks.