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

# keyclick

> 当 Roblox window active 时，发送 key down event，然后发送 key up event。keyCode 参数会作为 Lua number 检查，通过 integer conversion 转换，再使用 Windows key mapping 从 Windows virtual-key code 映射到 scan code，并通过带 KEYEVENTF_SCANCODE 的 keyboard input 发送。如果 isrbxactive 会为 false，该 function 会直接返回，不发送 input。

<div className="real-function-page">
  ```lua theme={null}
  keyclick(keyCode: number)
  ```

  ## 别名

  * `keytap`

  ## 参数

  <ParamField path={"keyCode"} type={"number"} required>
    作为 Lua number 读取，并在调用 Windows key mapping 前通过 integer conversion 转换的 Windows virtual-key code。
  </ParamField>
</div>
