mirror of
https://github.com/oasis-engine/engine.git
synced 2024-03-18 12:33:29 +00:00
Page:
Keyboard Input design
Pages
Home
How to write an e2e Test for runtime
Input system design
Keyboard Input design
Migration Guide
Milestone 0.5 development
Milestone 0.6 development
Milestone 0.7 development
Milestone 0.8 development
Milestone 0.9 development
Milestone development process specification template(Old)
Milestone development process specification template
Physical system design
Roadmap
Text system design
Texture system design
如何与我们共建 Galacean 开源互动引擎
Clone
4
Keyboard Input design
AZhan edited this page 2022-04-23 20:38:49 +08:00
Table of Contents
When implementing the input system, we made compatibility for all inputs, this keyboard event can be implemented very simply.
Input system design

API Design
/**
* Input Manager.
*/
export class InputManager {
/**
* Whether the key is being held down, if there is no parameter, return whether any key is being held down.
* @param key - The keys of the keyboard
* @returns Whether the key is being held down.
*/
isKeyHeldDown(key?: Keys): boolean {}
/**
* Whether the key starts to be pressed down during the current frame, if there is no parameter, return whether any key starts to be pressed down during the current frame.
* @param key - The keys of the keyboard
* @returns Whether the key starts to be pressed down during the current frame.
*/
isKeyDown(key?: Keys): boolean {}
/**
* Whether the key is released during the current frame, if there is no parameter, return whether any key released during the current frame.
* @param key - The keys of the keyboard
* @returns Whether the key is released during the current frame.
*/
isKeyUp(key?: Keys): boolean {}
}
/**
* The keys of the keyboard.
* Keep up with W3C standards.(https://www.w3.org/TR/2017/CR-uievents-code-20170601/)
*/
export enum Keys {
//...
}
Project Management
- Roadmap
- Migration Guide
- Milestone development process specification template
- Milestone 0.9 development
- Milestone 0.8 development
- Milestone 0.7 development
- Milestone 0.6 development
- Milestone 0.5 development
Architecture design
中文指引