我想在Android模拟器上运行/测试Android应用程序,我想用我的PC键盘键入,因为它让我键入和测试更快。当我使用仿真器时,它只接受来自原生Android(屏幕)键盘的输入。如何在Android仿真器中启用我的PC键盘?
我想在Android模拟器上运行/测试Android应用程序,我想用我的PC键盘键入,因为它让我键入和测试更快。当我使用仿真器时,它只接受来自原生Android(屏幕)键盘的输入。如何在Android仿真器中启用我的PC键盘?
I want to run/test Android apps on the Android emulator and I want to type using my PC keyboard, as it lets me type and test faster. When I use the emulator though, it only accepts input from the native Android (on-screen) keyboard. How can I enable my PC keyboard for use within the Android emulator?
升级开发人员工具后我有同样的问题(v20.0.0v2012 ......)。突然间,我的Android虚拟设备都不会接受我的物理PC / Mac键盘的任何输入。
这是我修复它的方式:
Window menu
> AVD Manager
Hardware
,单击 New
Keyboard Support
然后单击 OK
yes
我的其他没有这个"键盘支持" 硬件属性的AVDS不接受我的物理键盘输入。
I had the same issue after upgrading the developer tools (v20.0.0v2012...). All of a sudden none of my android virtual devices would accept any input from my physical PC/Mac keyboard.
This is how I fixed it:
Window menu
> AVD Manager
Edit
Hardware
, Click New
Keyboard Support
then click OK
yes
My other AVDs that don't have this "keyboard support" hardware property added do NOT accept my physical keyboard input.
请尝试以下设置。我的环境(目标:Android 4.0.3 - API级别15)成功。
AVD - 编辑 - 硬件: - 新... - 键盘支持 - 是
avd - 编辑 - 硬件: - 新的... - 键盘盖支持 - 没有
Please try the following settings. My environment (Target: Android 4.0.3 - API Level 15) successful.
AVD - Edit - Hardware: - New... - Keyboard support - yes
AVD - Edit - Hardware: - New... - Keyboard lid support - no
您需要在.android目录中更改config.ini文件。此文件位于主硬盘驱动器目录下。从那里开始,打开AVD文件,您将看到一个虚拟设备列表。打开所需的设备,然后在记事本中打开Config.ini。然后复制此文本:"hw.keyboard = yes" (减去引号),然后保存并关闭。下次打开仿真器时,您应该能够使用键盘。
您还可以在与config.ini的同一目录中打开硬件-qemu.ini文件,然后您可以看到所有硬件选项的列表。将HW.Keyboard从"否" 更改为"是" 。
希望这有帮助!
You need to change the config.ini file in your .android directory. This file is found under the main hard drive directory. From there, open the avd file and you will see a list of virtual devices. Open the desired device and then open the config.ini in notepad. Then copy this text: "hw.keyboard = yes" (minus the quotes) and then save and close. The next time you open your emulator, you should be able to use the keyboard.
You can also open up the hardware-qemu.ini file in the same directory as the config.ini and then you can see a list of all the hardware options. Change the hw.keyboard from "no" to "yes".
Hope this helps!
此答案是针对从源构建仿真器的人(i.e.从source.android.com的指令中构建仿真器)。您需要在以下文件中修改属性:
external/qemu/android/avd/hardware-properties.ini
在该文件的以下部分中将缺省值从否变为yes:
# Keyboard support (qwerty/azerty) name = hw.keyboard<br/> type = boolean<br/> default = yes<br/> abstract = Keyboard support<br/> description = Whether the device has a QWERTY keyboard.<br/>
然后重建(使用make)。至少这为我工作了。
This answer is for those who built the emulator from source (i.e. Following instructions from source.android.com). You need to modify a property in the following file:
external/qemu/android/avd/hardware-properties.ini
In the following section of that file change the default value from no to yes:
# Keyboard support (qwerty/azerty) name = hw.keyboard<br/> type = boolean<br/> default = yes<br/> abstract = Keyboard support<br/> description = Whether the device has a QWERTY keyboard.<br/>
Then rebuild (using make). At least this worked for me.
我有这个问题尽管有正确的配置,并且意识到实际问题是,焦点在仿真器控制按钮窗口上,如此问题。
要检查此问题是否是您的问题,请参阅按下空间是否实际按下其中一个按钮,如果按Tab移动仿真器控件中的元素之间的高亮焦距方形。如果这是问题,那么你应该能够如下工作:焦点现在应该返回主Android仿真器窗口,而不是仿真器控件,并且键压应转到Android应用程序。
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.
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:
The focus should now return to the main Android emulator window, not the emulator controls, and key presses should go to Android apps.
在此处指示,应为AVD仿真器实例启用PC键盘。判断仿真器页面
As a few have indicated here, the PC keyboard should be enabled for the AVD Emulator instances. Judging by what the emulator page on Android Developer says about key commands and such, it does not appear there is a way to enable/disable PC keyboard usage within the SDK. Your best bet is re-installing the SDK then, and try again.
尝试 ctrl + f11 或numpad 7 。这应该启用键盘,除非从其他地方禁用。
Try Ctrl + F11 or NumPad 7. That should enable your keyboard, unless is disabled from somewhere else.
如果使用 Xamarin.Android
在 Visual Studio 2010
中,您可以启用 Keyboard Support
如下:
Tools > Start Android Emulator Manager
AVD Name
要添加 Keyboard Support
,然后单击 Edit
按钮 Hardware
区域中,单击 # Keyboard support (qwerty/azerty) name = hw.keyboard<br/> type = boolean<br/> default = yes<br/> abstract = Keyboard support<br/> description = Whether the device has a QWERTY keyboard.<br/> 0
按钮 # Keyboard support (qwerty/azerty) name = hw.keyboard<br/> type = boolean<br/> default = yes<br/> abstract = Keyboard support<br/> description = Whether the device has a QWERTY keyboard.<br/> 1
下拉列表中,选择 # Keyboard support (qwerty/azerty) name = hw.keyboard<br/> type = boolean<br/> default = yes<br/> abstract = Keyboard support<br/> description = Whether the device has a QWERTY keyboard.<br/> 2
,然后单击 # Keyboard support (qwerty/azerty) name = hw.keyboard<br/> type = boolean<br/> default = yes<br/> abstract = Keyboard support<br/> description = Whether the device has a QWERTY keyboard.<br/> 3
按钮 # Keyboard support (qwerty/azerty) name = hw.keyboard<br/> type = boolean<br/> default = yes<br/> abstract = Keyboard support<br/> description = Whether the device has a QWERTY keyboard.<br/> 4
# Keyboard support (qwerty/azerty) name = hw.keyboard<br/> type = boolean<br/> default = yes<br/> abstract = Keyboard support<br/> description = Whether the device has a QWERTY keyboard.<br/> 5
被添加到 # Keyboard support (qwerty/azerty) name = hw.keyboard<br/> type = boolean<br/> default = yes<br/> abstract = Keyboard support<br/> description = Whether the device has a QWERTY keyboard.<br/> 6
列表中。更改 # Keyboard support (qwerty/azerty) name = hw.keyboard<br/> type = boolean<br/> default = yes<br/> abstract = Keyboard support<br/> description = Whether the device has a QWERTY keyboard.<br/> 7
从 # Keyboard support (qwerty/azerty) name = hw.keyboard<br/> type = boolean<br/> default = yes<br/> abstract = Keyboard support<br/> description = Whether the device has a QWERTY keyboard.<br/> 8
到 # Keyboard support (qwerty/azerty) name = hw.keyboard<br/> type = boolean<br/> default = yes<br/> abstract = Keyboard support<br/> description = Whether the device has a QWERTY keyboard.<br/> 9
Xamarin.Android0
按钮
If you are using Xamarin.Android
in Visual Studio 2010
, you can enable Keyboard Support
as follows:
Tools > Start Android Emulator Manager
AVD Name
that you want to add Keyboard Support
for, then click the Edit
buttonHardware
area, click the New
buttonProperty
dropdown, select Keyboard support
, then click the OK
buttonKeyboard support
Property
is added to the Hardware
list. Change the Value
from No
to Yes
Edit AVD
button© 2022 it.wenda123.org All Rights Reserved. 问答之家 版权所有