28

I just set up of Android development environment in Ubuntu 12.04. I made an AVD for Android version 2.3.3 and ran my app on it. But I am not able to use my computer's keyboard or keyboard given on the right side of it. What is the reason for this?

My ADT version is 20.0. I was earlier developing on Windows and it was working fine.

Yehuda Katz
  • 28,535
  • 12
  • 89
  • 91
rishiag
  • 2,248
  • 9
  • 32
  • 57
  • Does your emulator have a keyboard? If not, AFAIK, you need to use the software keyboard. – dmck Jul 03 '12 at 18:21
  • This has been covered in detail here: http://stackoverflow.com/questions/11235370/android-emulator-doesnt-take-keyboard-input-sdk-tools-rev-20/11259922#11259922 – Romin Jul 04 '12 at 05:35
  • Check out from the below link: - https://stackoverflow.com/a/47258221/6342081 – Tejshree Nov 13 '17 at 06:38
  • Check out from the below link: - https://stackoverflow.com/a/47258221/6342081 – Tejshree Nov 13 '17 at 06:39

3 Answers3

27

Got the answer from here. Apparently they have removed default keyboard support after ADT 20.0, so we need to add keyboard support manually by editing the AVD.

Community
  • 1
  • 1
rishiag
  • 2,248
  • 9
  • 32
  • 57
19

I have just tested and it still works perfectly. You just need to enable this. And I do not see anything in the AVD documentation that would show it is no longer supported. Probably they have added the support back.

AVD settings for the different Android version seem slightly different. For old versions (2.x), add the hardware property "Keyboard support", set the value to yes, as shown here:

Keyboard support - 2.1

For newer versions, there is a checkbox you need to check:

Keyboard support - 4.1.2

I have just tested on my Android development environment (Eclipse, Ubuntu) - for both cases, the keyboard does work inside the emulator.

Audrius Meškauskas
  • 20,936
  • 12
  • 75
  • 93
1

If you're using Eclipse/ADT in Windows 8.1 you have to enable keyboard support by changing this setting:

hw.keyboard = yes

which is located in the hardware.ini of your AVD skin. You can find it here:

<ANDROID_SDK_PATH>\sdk\platforms\android-<APIversion>\skins\<YourSkin>\hardware.ini

Since the default is (for most skins, including Galaxy S2 one which I'm using mostly) set to no.

Darkseal
  • 9,205
  • 8
  • 78
  • 111