How enable physical keyboard on Emulator in Android Studio? (Used to work)

AndroidAndroid StudioAvd

Android Problem Overview


I'm not sure what changed but the physical keyboard from my computer no longer works for the emulator (running kitkat in Nexus 5, x86). When i look in AVD at the device's advanced settings, there's nothing for a hardware keyboard. Where is this setting?

Android Solutions


Solution 1 - Android

In the advanced settings of a virtual device in Android Studio 1.0.2 AVD Manager, there is actually a checkbox that allows to enable keyboard input without editing the config.ini by hand.

Tools → Android → AVD Manager → pencil icon (shown in picture) → Show Advanced Settings (scroll to bottom) → Enable Keyboard Input

enter image description here

Solution 2 - Android

Find the emulator's configuration in your home directory:

//Located in:
~/.android/avd/<The_Device_Name>/config.ini

For example, on the Nexus 5 (created by Android Studio), it was:

~/.android/avd/Nexus5.avd/config.ini

Change the below setting to be:

hw.keyboard=yes

Solution 3 - Android

Open and Navigate to Tools → Android → AVD Manager → Edit -> pencil icon)

enter image description here

Click on Show Advanced settings and scroll down and you can see the option Enable Keyboard input (example second image) Check that box and Click on Finish.

enter image description here

Solution 4 - Android

UPDATE:

Change hw.keyboard = yes.

And make the file config.ini Read-only:

1.Right-click on the file open its settings.

2.Make every options on the permissions tab into Read-only(refer screenshot)

enter image description here

Trust me this will work it happens because this file gets rewritten,when we lock it out the bug disappears.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionDon RhummyView Question on Stackoverflow
Solution 1 - AndroidcarineView Answer on Stackoverflow
Solution 2 - AndroidDon RhummyView Answer on Stackoverflow
Solution 3 - AndroidParvathy NairView Answer on Stackoverflow
Solution 4 - AndroidAmal pView Answer on Stackoverflow