If you want to disable the home/menu/back/search keys or key layout in your apps. You can add some code response the key press event. But if you want to do this out of your apps, you can change the config of system key layout. Of course you have to root first.
You can find *.kl files in /system/usr/keylayout .
Here are some instructions for the files.
AVRCP.kl - Key layout used for Bluetooth AVRCP support.
Generic.kl - Generic key layout file for full alphabetic US English PC style external keyboards.
qwerty.kl - Emulator keyboard layout #1.
Vendor_045e_Product_028e.kl - XBox 360 USB Controller
Vendor_046d_Product_c216.kl - Logitech Dual Action Controller
Vendor_046d_Product_c294.kl - Logitech G25 Racing Wheel (in Compatibility Mode)
Vendor_046d_Product_c299.kl - Logitech G25 Racing Wheel (in Native Mode)
Vendor_046d_Product_c532.kl - Logitech Revue Wireless keyboard
Vendor_054c_Product_0268.kl - Sony Playstation(R)3 Controller
Vendor_05ac_Product_0239.kl - Apple Wireless Keyboard
Vendor_22b8_Product_093d.kl - Motorola Bluetooth Wireless Keyboard.
Edit one .kl file for example.
Here is one line of .kl file.
key 158 BACK WAKE_DROPPED
Explain:
158 - key code
BACK - key function
WAKE - wake up device with sending message to apps
WAKE_DROPPED - wake up device without sending message to apps
We can change BACK to MENU, save the file, restart. Than BACK key changed to MENU key.
So than we can disable any keys or key layout of your device.