Google Chrome Mobile Emulator: How to show on screen keyboard

青春壹個敷衍的年華 提交于 2020-01-11 15:18:51

问题


I'm debugging a mobile version of our website through Chrome's Mobile Emulation tool, but cannot figure out how to have an on-screen keyboard pop up when selecting a text field.

I have clicked on the text box, but no keyboard pops up. If I do this on a mobile device, the default input method (keyboard) pops up and allows me to type.

Is there a way to replicate this?


回答1:


Update: Elevating important comments by Ray Foss and Rafael S. Fijalkowski...

🙁 Virtual keyboard support is deprecated in Chrome 68+; this answer no longer works.


Original answer

Latest Chrome developer tools have added support for emulating different device states:

  • Default browser UI
  • With Chrome navigation bar
  • With opened keyboard

According to the documentation, such feature is only available when emulating “supported devices like the Nexus 5X”.

The complete list of emulated devices that support this feature can be found at Chromium source-code. Currently, it is only supported by:

  • Nexus 5
  • Nexus 5X

Note that the emulated keyboard and navigation bar are just static pictures (as you can see at the source-code directory) and don't contain any interactive behavior. It is a good enough way to simulate the screen size, but it is not a perfect emulation.




回答2:


The closest I have come is using the virtual keyboard extension from: "Chrome Virtual Keyboard"

  • http://xontab.com/Apps/VirtualKeyboard or
  • http://xontab.azurewebsites.net/VirtualKeyboard

Note: I had to set it to use the touch events when using it with a Sencha Touch app I was working on.

There are a number of others so just search for "virtual keyboard" in the chrome extensions area and pick what you like.



来源:https://stackoverflow.com/questions/29637425/google-chrome-mobile-emulator-how-to-show-on-screen-keyboard

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!