如何在android模拟器中模拟按下home按钮

发布于 2024-12-07 19:48:50 字数 80 浏览 1 评论 0原文

据我了解,在android模拟器中,您可以模拟普通手机的大部分功能,背面是由ESC模拟的,在android模拟器中按home按钮的快捷方式是什么。

In android emulator as I understand you can emulate most of the functionality of regular phone, back is emulated by ESC , what is shortcut for pressing home button in android emulator.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

锦爱 2024-12-14 19:48:50

来自 开发者 android

----------------------------------------------------------------------------------
| Emulated Device Key                      |              Keyboard Key           |
----------------------------------------------------------------------------------
| Home                                     |   HOME (FN + left_arrow on Macbooks)|  
----------------------------------------------------------------------------------
| Menu (left softkey)                      |          F2 or Page-up button       |
----------------------------------------------------------------------------------
| Star (right softkey)                     |         Shift-F2 or Page Down       |  
----------------------------------------------------------------------------------
| Back                                     |                  ESC                | 
----------------------------------------------------------------------------------
| Call/dial button                         |                   F3                |
----------------------------------------------------------------------------------
| Hangup/end call button                   |                   F4                |
----------------------------------------------------------------------------------
| Search                                   |                   F5                |
----------------------------------------------------------------------------------
| Power button                             |                   F7                |
----------------------------------------------------------------------------------
| Audio volume up button                   |        KEYPAD_PLUS, Ctrl-F5         |
----------------------------------------------------------------------------------
| Audio volume down button                 |       KEYPAD_MINUS, Ctrl-F6         |
----------------------------------------------------------------------------------
| Camera button                            |       Ctrl-KEYPAD_5, Ctrl-F3        |
----------------------------------------------------------------------------------
| Switch to previous layout orientation    |         KEYPAD_7, Ctrl-F11          |
|(for example,portrait,landscape)          |                                     | 
----------------------------------------------------------------------------------
| Switch to next layout orientation        |         KEYPAD_9, Ctrl-F12          |
|(for example,portrait,landscape)          |                                     |  
----------------------------------------------------------------------------------
|Toggle cell networking on/off             |                   F8                |
----------------------------------------------------------------------------------
| Toggle code profiling                    | F9 (only with -trace startup option)|
----------------------------------------------------------------------------------
| Toggle fullscreen mode                   |               Alt-Enter             |
----------------------------------------------------------------------------------
| Toggle trackball mode                    |                  F6                 |
----------------------------------------------------------------------------------
| Enter trackball mode temporarily         |                Delete               |
|(while key is pressed)                    |                                     |
----------------------------------------------------------------------------------
| DPad left/up/right/down                  |             KEYPAD_4/8/6/2          |
----------------------------------------------------------------------------------
| DPad center click                        |               KEYPAD_5              |  
----------------------------------------------------------------------------------
| Onion alpha increase/decrease            |KEYPAD_MULTIPLY(*) / KEYPAD_DIVIDE(/)|
----------------------------------------------------------------------------------

From developer android:

----------------------------------------------------------------------------------
| Emulated Device Key                      |              Keyboard Key           |
----------------------------------------------------------------------------------
| Home                                     |   HOME (FN + left_arrow on Macbooks)|  
----------------------------------------------------------------------------------
| Menu (left softkey)                      |          F2 or Page-up button       |
----------------------------------------------------------------------------------
| Star (right softkey)                     |         Shift-F2 or Page Down       |  
----------------------------------------------------------------------------------
| Back                                     |                  ESC                | 
----------------------------------------------------------------------------------
| Call/dial button                         |                   F3                |
----------------------------------------------------------------------------------
| Hangup/end call button                   |                   F4                |
----------------------------------------------------------------------------------
| Search                                   |                   F5                |
----------------------------------------------------------------------------------
| Power button                             |                   F7                |
----------------------------------------------------------------------------------
| Audio volume up button                   |        KEYPAD_PLUS, Ctrl-F5         |
----------------------------------------------------------------------------------
| Audio volume down button                 |       KEYPAD_MINUS, Ctrl-F6         |
----------------------------------------------------------------------------------
| Camera button                            |       Ctrl-KEYPAD_5, Ctrl-F3        |
----------------------------------------------------------------------------------
| Switch to previous layout orientation    |         KEYPAD_7, Ctrl-F11          |
|(for example,portrait,landscape)          |                                     | 
----------------------------------------------------------------------------------
| Switch to next layout orientation        |         KEYPAD_9, Ctrl-F12          |
|(for example,portrait,landscape)          |                                     |  
----------------------------------------------------------------------------------
|Toggle cell networking on/off             |                   F8                |
----------------------------------------------------------------------------------
| Toggle code profiling                    | F9 (only with -trace startup option)|
----------------------------------------------------------------------------------
| Toggle fullscreen mode                   |               Alt-Enter             |
----------------------------------------------------------------------------------
| Toggle trackball mode                    |                  F6                 |
----------------------------------------------------------------------------------
| Enter trackball mode temporarily         |                Delete               |
|(while key is pressed)                    |                                     |
----------------------------------------------------------------------------------
| DPad left/up/right/down                  |             KEYPAD_4/8/6/2          |
----------------------------------------------------------------------------------
| DPad center click                        |               KEYPAD_5              |  
----------------------------------------------------------------------------------
| Onion alpha increase/decrease            |KEYPAD_MULTIPLY(*) / KEYPAD_DIVIDE(/)|
----------------------------------------------------------------------------------
jJeQQOZ5 2024-12-14 19:48:50

键盘主页按钮。键盘快捷键列表位于此处

The keyboard Home button. The list of keyboard shortcuts is available here.

公布 2024-12-14 19:48:50

新版本更改了键盘快捷键,在模拟器中按F1即可获得完整的快捷键。 Android API_25+

The keyboard shortcut changed in new version, Press F1 in emulator, to get complete shortcuts. Android API_25+

别想她 2024-12-14 19:48:50

对于使用 Webdriver.io 的 JavaScript 中的 Android 模拟器:

await driver.pressKeyCode(3)
// This is the keyCode for the home btn

For Android Emulator in JavaScript using Webdriver.io:

await driver.pressKeyCode(3)
// This is the keyCode for the home btn
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文