手册
脚本 API
unity3d.com
Version:
2018.4
2023.2
2023.1
2022.3
2022.2
2022.1
2021.3
2021.2
2021.1
2020.3
2020.2
2020.1
2019.4
2019.3
2019.2
2019.1
2018.4
2018.3
2018.2
2018.1
2017.4
2017.3
2017.2
2017.1
5.6
包含此页的版本:
不含此页的版本:
受支持
旧版
手册
脚本 API
语言:
中文
English
中文
日本語
한국어
脚本 API
Version:
2018.4
2023.2
2023.1
2022.3
2022.2
2022.1
2021.3
2021.2
2021.1
2020.3
2020.2
2020.1
2019.4
2019.3
2019.2
2019.1
2018.4
2018.3
2018.2
2018.1
2017.4
2017.3
2017.2
2017.1
5.6
包含此页的版本:
不含此页的版本:
受支持
旧版
Experimental
: this API is experimental and might be changed or removed in the future.
IKeyboardEvent
interface in UnityEngine.Experimental.UIElements
切换到手册
描述
键盘事件接口。
变量
actionKey
如果按下了特定于平台的操作键,则返回 true。此键是 macOS 上的 Command 键,其他平台上是 Control 键。
altKey
如果按下 Alt 键,则返回 true。
character
字符。
commandKey
如果按下 Windows/Command 键,则返回 true。
ctrlKey
如果按下 Control 键,则返回 true。
keyCode
键代码。
modifiers
标志集,用于保存所按修改键(Alt、Control、Shift、Windows/Command)。
shiftKey
如果按下 Shift 键,则返回 true。