> For the complete documentation index, see [llms.txt](https://docs.gpmautomate.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gpmautomate.com/automate-zh/action-shi-yong-zhi-nan/phone-action/key-press.md).

# 按下按键

发送一个按键事件到设备。

按下按键是向手机设备发送一个按键事件，例如按下 Enter 进行搜索，调高/调低音量，打开相机...

#### 配置参数说明：

* Key: 需要发送的按键名称或 Android 的 keycode。接受的按键名称有：`back`、`home`、`menu`、`power`、`wakeup`、`volumeup`、`volumedown`、`enter`、`tab`、`space`、`delete`、`escape`、`search`、`camera`、`copy`、`paste` — 或直接输入 Android 的 keycode 数字，例如 `66` 对应 Enter 键。

<figure><img src="https://1806980278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiDNNiVZHPKSIcyshmOTB%2Fuploads%2Fgit-blob-b8592d1f9a8d9ac4a6668740cb5b13a39ad772e9%2Fpx-04.png?alt=media" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.gpmautomate.com/automate-zh/action-shi-yong-zhi-nan/phone-action/key-press.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
