docs: rebuild Input API content

This commit is contained in:
2026-03-26 17:39:53 +08:00
parent ec4edb2689
commit ce2eee32e3
54 changed files with 1108 additions and 941 deletions

View File

@@ -1,35 +1,36 @@
# InputManager::ProcessKeyUp
公开方法,详见头文件声明
向输入系统注入一个按键抬起事件
```cpp
void ProcessKeyUp(KeyCode key, bool alt, bool ctrl, bool shift, bool meta);
```
该方法声明于 `XCEngine/Input/InputManager.h`,当前页面用于固定 `InputManager` 类目录下的方法级 canonical 路径。
## 行为说明
**参数:**
- `key` - 参数语义详见头文件声明。
- `alt` - 参数语义详见头文件声明。
- `ctrl` - 参数语义详见头文件声明。
- `shift` - 参数语义详见头文件声明。
- `meta` - 参数语义详见头文件声明。
当前实现会:
**返回:** `void` - 无返回值。
- 如果未初始化或键索引越界,直接返回
-`m_keyDown[index]` 设为 `false`
- 构造 `KeyEvent`,类型固定为 `KeyEvent::Up`
- 同步触发 `m_onKeyEvent`
**示例:**
当前没有单独的 “key up this frame” 标志位;抬起后,`IsKeyUp` 会立即通过 `!IsKeyDown(key)` 成立。
```cpp
#include <XCEngine/Input/InputManager.h>
## 参数
void Example() {
XCEngine::Input::InputManager object;
// 根据上下文补齐参数后调用 InputManager::ProcessKeyUp(...)
(void)object;
}
```
- `key` - 键值。
- `alt` - Alt 修饰键状态。
- `ctrl` - Ctrl 修饰键状态
- `shift` - Shift 修饰键状态。
- `meta` - Meta 修饰键状态。
## 返回值
- 无。
## 相关文档
- [返回类总览](InputManager.md)
- [返回模块目录](../Input.md)
- [返回类总览](InputManager.md)
- [ProcessKeyDown](ProcessKeyDown.md)
- [OnKeyEvent](OnKeyEvent.md)