> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Action

> Action

# Action

可引用的物理手柄操作。

## 操作值

| Action | 描述 |
| :- | :- |
| **gamepadA** | 按下 A 按钮 |
| **gamepadB** | 按下 B 按钮 |
| **gamepadX** | 按下 X 按钮 |
| **gamepadY** | 按下 Y 按钮 |
| **view** | 按下 view 按钮 |
| **menu** | 按下 menu 按钮 |
| **leftBumper** | 按下左肩键 |
| **rightBumper** | 按下右肩键 |
| **dPadLeft** | 按下方向键左方向 |
| **dPadRight** | 按下方向键右方向 |
| **dPadUp** | 按下方向键上方向 |
| **dPadDown** | 按下方向键下方向 |
| **leftThumb** | 按下左操纵杆的拇指杆 |
| **rightThumb** | 按下右操纵杆的拇指杆 |
| **leftTrigger** | 完全按下左扳机 |
| **rightTrigger** | 完全按下右扳机 |
| **leftJoystickRight** | 左操纵杆一直推向右侧 |
| **leftJoystickLeft** | 左操纵杆一直推向左侧 |
| **leftJoystickUp** | 左操纵杆一直推向上方 |
| **leftJoystickDown** | 左操纵杆一直推向下方 |
| **rightJoystickRight** | 右操纵杆一直推向右侧 |
| **rightJoystickLeft** | 右操纵杆一直推向左侧 |
| **rightJoystickUp** | 右操纵杆一直推向上方 |
| **rightJoystickDown** | 右操纵杆一直推向下方 |

## 备注

`action` 可以是手柄上的任何按钮、左肩键、右肩键、扳机键或拇指杆按下动作。它也可以映射到极坐标操纵杆操作，例如操纵杆被完全推向某个特定方向。

控件可以接受单个 `action` 或表示同时执行多个操作的 `array`。

## 示例

#### 示例 1：操作是按下 A 按钮

```JSON theme={null}
"action": "gamepadA"
```

#### 示例 2：操作是同时按下左肩键和右肩键

```JSON theme={null}
"action": [ "leftBumper", "rightBumper" ]
```

## 另请参阅

[Touch Adaptation Kit 参考](https://devdocs.xbox.com/zh-CN/build/core-features/common/game-streaming/game-streaming-touch-touch-adaptation-kit-overview.md)\
[Layer 操作](https://devdocs.xbox.com/zh-CN/reference/system/touchadaptationkit/layout/game-streaming-touch-layer-action)


## Related topics

- [action_executed](https://devdocs.xbox.com/services/playfab/api-references/events/PlayStream/action-executed.md)
- [action_failed](https://devdocs.xbox.com/services/playfab/api-references/events/PlayStream/action-failed.md)
