You’ll need to modify the Device Definitions. To do this, find the “Device Definitions” tab in the Android Virtual Device Manager and double click on the device you’re using.
Make sure the Buttons are set to Hardware.
Don’t forget to update your device settings: