The Hardware library was updated with a small update.
You can now use a custom set of values as the hardware keys values.
See the Kiosk example: http://www.b4x.com/forum/showthread.php?t=500 for an example of using it.
You could catch the 5 hardware buttons not the hardware keyboard buttons.
Some devices use different values than other devices, now you can use your own values (like in the Kiosk example).