0

I just migrated my projects and development to Android Studio. Even though I prefer to use hardware devices for development/testing sometimes I use the emulator. On Android studio I cannot find the option to enable the hardware keys on the device! How can I press now the power button/volume buttons, home/back/menu buttons?

I have already tried creating a new device and enabling the hardware keys on the device settings. But I do not get them.

Any help would be appreciated.

fazineroso
  • 7,196
  • 7
  • 31
  • 42

1 Answers1

0

I don't know for sure about making the buttons show up on the UI, but you can use ADB to send key events to your device.

for example: adb shell input keyevent 3 is equivalent to clicking the home button.

For a complete list of valid key codes check this answer to another question.

Community
  • 1
  • 1
Matthew Pape
  • 1,681
  • 1
  • 22
  • 25