I am writing a launcher for kids, it has its own applications and folder and features. so when kids wants to play with parents device , parents run this launcher and they can be sure that their kids are not able to mess with their data. and to exit from this launcher ,parents should enter their password.
so when kids are using this launcher the Home button
and Back button
also the other hardware keys should not work, cause for example if the back button
works the kid can leave the launcher while to exit from this launcher parents should enter their password.
any idea that how can i disable hardware keys
or any other way to handle it?
If you want to disable the Home, Menu and Back button.There is a way ,
find the key layout files found in out/target/product/generic/system/usr/keylayout. Open the Generic.kl file and make the below lines comments by adding a #
# key 158 BACK WAKE_DROPPED
# key 172 HOME
Need any further advice , I am here to help:) Referred from Disable hardware keys android rom