PC键盘在Android模拟器中不起作用 [英] PC keyboard not working in Android emulator

查看:189
本文介绍了PC键盘在Android模拟器中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

即使我在创建AVD时选择了启用键盘输入",也无法使用PC键盘将字符输入到在AVD模拟器上运行的应用程序中.有人可以帮忙吗?

I'm unable to use my PC keyboard to input characters into the app running on AVD emulator even though I had chosen 'Enable keyboard input' when creating the AVD. Can anyone help?

下面是我的config.ini.

Below is my config.ini.

注意

可以从AVD Manager访问文件目录:

File directory can be accessed from AVD Manager:

->单击操作"列上的向下箭头

-> click the down arrow on the Actions column

->在磁盘上显示.

对于GNU/Linux用户,使用默认的Android Studio配置, 在目录下找到文件 /home/<<user>>/.android/avd/<<device>>.avd

For GNU/Linux users, with default Android Studio configuration, the file is found under directory /home/<<user>>/.android/avd/<<device>>.avd

config.ini

avd.ini.encoding=UTF-8
AvdId=Nexus_5_API_21
abi.type=x86_64
avd.ini.displayname=Nexus 5 API 21
disk.dataPartition.size=200M
hw.accelerometer=yes
hw.audioInput=yes
hw.battery=yes
hw.camera.back=none
hw.camera.front=none
hw.cpu.arch=x86_64
hw.dPad=no
hw.device.hash2=MD5:2fa0e16c8cceb7d385183284107c0c88
hw.device.manufacturer=Google
hw.device.name=Nexus 5
hw.gps=yes
hw.gpu.enabled=yes
hw.keyboard=yes
hw.lcd.density=480
hw.mainKeys=no
hw.ramSize=1536
hw.sdCard=yes
hw.sensors.orientation=yes
hw.sensors.proximity=yes
hw.trackBall=no

image.sysdir.1=system-images/android-21/default/x86_64/
runtime.network.latency=none
runtime.network.speed=full
runtime.scalefactor=0.25
sdcard.path=/Users/xxxxxx/.android/avd/Nexus_5_API_21.avd/sdcard.img
skin.dynamic=yes
skin.name=nexus_5
skin.path=/Applications/Android Studio.app/Contents/plugins/android/lib/device-art-resources/nexus_5
snapshot.present=no
tag.display=Default
tag.id=default
vm.heapSize=64

更多信息: 我正在使用Mac OS X 10.10.4(Yosemite). Android Studio 1.3

More info: I'm using Mac OS X 10.10.4 (Yosemite). Android Studio 1.3

推荐答案

尽管配置正确,但我还是遇到了这个问题,并且意识到实际的问题是焦点集中在仿真器控制按钮窗口上,如此问题.

I had this issue despite having the correct configuration, and realized that the actual problem was that the focus was on the emulator control buttons windows, as reported in this issue.

要检查这是否是您的问题,请查看是否按空格键实际上按了其中一个按钮,并且按Tab键是否在模拟器控件中的元素之间移动了突出显示的焦点方块.如果这是问题所在,那么您应该可以按照以下方法解决此问题:

To check if this is your problem, see if pressing space actually presses one of those buttons, and if pressing tab moves the highlight focus square between elements in the emulator controls. If that is the problem, then you should be able to work around it as follows:

  • 选择扩展控件(仿真器控件中的"..."按钮)
  • 通过单击更改为扩展控件窗口中的任何项目
  • 关闭扩展控件窗口

现在焦点应返回到Android仿真器主窗口,而不是仿真器控件,并且按键应转到Android应用程序.

The focus should now return to the main Android emulator window, not the emulator controls, and key presses should go to Android apps.

这篇关于PC键盘在Android模拟器中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆