Android AVD键盘输入在xUbuntu OS上一直无法正常工作 [英] Android AVD keyboard input not working all the time on xUbuntu OS

查看:71
本文介绍了Android AVD键盘输入在xUbuntu OS上一直无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在xubuntu机器上的行为很奇怪,我不知道为什么.

I have a weird behavior on my xubuntu machine and I don't know why.

  1. 启动模拟器,并在应用程序中添加一个EditText.
  2. 点击EditText,然后弹出android键盘
  3. 轻按PC的硬件键盘上的键,但仿真器上没有输入.
  4. 现在这是奇怪的部分,点击模拟器设置的3点菜单:

  1. Start the emulator and have a EditText in the app.
  2. Tap on EditText and the android keyboard pops up
  3. Tap keys on my PC's hardware keyboard but no input on the emulator.
  4. Now here is the weird part, tap on the 3 dots menu of the emulator settings:

将打开设置"屏幕,例如带有位置"设置的位置,其中确实有经度"的输入字段.我关闭屏幕

The settings screen opens, for instance with the Locations setting which does have an input field for Longitude. I close the screen

因此,基本上,仅在执行了这些步骤之后,我才能使用键盘在仿真器中输入.如果我返回Android Studio并输入一些内容,那么当我返回仿真器时,它将无法正常工作. 如何使输入始终保持工作状态?

So, basically only after doing these steps I can input in the emulator using my keyboard. If I go back to Android Studio and type something, when I return to the emulator, it does not work. How can I make the input work all the time?

推荐答案

您看到的主要情况是,即使您单击Android Emulator Window,它也不具有正确的焦点.是的,您可以进行任何触摸操作,但是边框仍然显得没有聚焦.

You see, the main case is Android Emulator Window don't have the proper focus even when you click on it. Yes, you can do any touch-operations, but frame still appears non-focused.

我为此找到了一个解决方法:

  1. 转到您的窗口管理器
  2. 找到焦点标签
  3. 更改焦点模型-> 焦点跟随鼠标"
  4. (可选)应用适当的延迟(我已将其设置为最低值)
  5. 禁用当窗口获得焦点时自动升起窗口" 选项.
  1. Go to your Window Manager
  2. Find Focus tab
  3. Change Focus Model -> "Focus follow mouse"
  4. (Optional) Apply proper delay (I've put it to the lowest value)
  5. Disable "Automatically raise windows when they receive focus" option bellow.

现在,只要将光标悬停在仿真器窗口上方,它将获得正确的聚焦状态,并且可以使用键盘了.

Now, whenever you hang your cursor above the emulator window it'll gain correct focusing state and you'd be able to use you keyboard just fine.

这篇关于Android AVD键盘输入在xUbuntu OS上一直无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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