简体   繁体   English

在Ubuntu中使用计算机键盘的Android edittext

[英]Android edittext using computer keyboard in Ubuntu

In Ubuntu 12.04, I'm not able to write on edittexts using the computer keyboard... Someone knows how to solve this issue? 在Ubuntu 12.04中,我无法使用计算机键盘在edittexts上写...有人知道如何解决此问题?

Thanks in advance! 提前致谢!

(I'm assuming you're working with the emulator here) (我假设您在这里使用仿真器)

Even though the developer documentation says keyboard support is enabled by default it doesn't seem to be that way in SDK rev 20. I explicitly enabled keyboard support in my emulator's config.ini file and that worked! 即使开发人员文档说默认情况下键盘支持是启用的,但在SDK rev 20中似乎不是这样。我在模拟器的config.ini文件中显式启用了键盘支持,并且有效!

Add: hw.keyboard=yes 添加: hw.keyboard=yes

To: ~/.android/avd/<emulator-device-name>.avd/config.ini 到: ~/.android/avd/<emulator-device-name>.avd/config.ini

Reference: http://developer.android.com/tools/devices/managing-avds-cmdline.html#hardwareopts 参考: http : //developer.android.com/tools/devices/managing-avds-cmdline.html#hardwareopts

On Mac OS and Linux you can edit all of your emulator configurations with one Terminal command: 在Mac OS和Linux上,您可以使用一个Terminal命令编辑所有仿真器配置:

for f in ~/.android/avd/*.avd/config.ini; do echo 'hw.keyboard=yes' >> "$f"; done

转到AVD管理器 ->单击编辑 --->单击硬件标签下的新建 ->选择键盘支持 ->设置为YES (默认值为NO)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM