如何在Android Studio中的模拟器上启用物理键盘? (曾经工作)

如何在Android Studio中的模拟器上启用物理键盘? (曾经工作)

问题描述:

我不确定发生了什么变化,但是计算机上的物理键盘不再适用于仿真器(在Nexus 5,x86中运行kitkat).当我在AVD中查看设备的高级设置时,硬件键盘一无所有.该设置在哪里?

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?

在主目录中找到仿真器的配置:

Find the emulator's configuration in your home directory:

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

例如,在Nexus 5(由Android Studio创建)上,它是:

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

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

将以下设置更改为:

hw.keyboard=yes