Keyboard input. Key / scancode names follow SDL naming (SDL_GetKeyName / SDL_GetScancodeName), e.g. "A", "Return", "Left Ctrl". 更多...
#include <Keyboard.h>
Public 成员函数 | |
| Module_REG (Keyboard) | |
| virtual | ~Keyboard () |
| Releases backend keyboard state. | |
| virtual void | setKeyRepeat (bool enable)=0 |
| Whether held keys emit repeated keypressed events. | |
| virtual bool | hasKeyRepeat () const =0 |
| True when key-repeat events are enabled. | |
| virtual bool | isDown (const std::string &key) const =0 |
| True if any of the named keys is currently down. | |
| virtual bool | isDown (const std::vector< std::string > &keys) const =0 |
| True if any key in the list is currently down. | |
| virtual bool | isScancodeDown (const std::string &scancode) const =0 |
| True if any of the named physical scancodes is currently down. | |
| virtual bool | isScancodeDown (const std::vector< std::string > &scancodes) const =0 |
| True if any scancode in the list is currently down. | |
| virtual std::string | getKeyFromScancode (const std::string &scancode) const =0 |
| Layout-aware key name for a physical scancode (SDL names). | |
| virtual std::string | getScancodeFromKey (const std::string &key) const =0 |
| Physical scancode name for a layout-aware key (SDL names). | |
| virtual void | setTextInput (bool enable)=0 |
| Enables or disables text-input / IME composition. | |
| virtual void | setTextInput (bool enable, double x, double y, double w, double h)=0 |
| Hint where text appears so on-screen keyboards avoid covering it (pixel coords). | |
| virtual bool | hasTextInput () const =0 |
| True while text-input / IME is active. | |
| virtual bool | hasScreenKeyboard () const =0 |
| True when the platform exposes an on-screen keyboard. | |
Public 成员函数 继承自 eve::Module | |
| virtual | ~Module () |
| Module. | |
| virtual std::string | getName () const =0 |
| Returns the name. | |
详细描述
Keyboard input. Key / scancode names follow SDL naming (SDL_GetKeyName / SDL_GetScancodeName), e.g. "A", "Return", "Left Ctrl".
在文件 Keyboard.h 第 15 行定义.
构造及析构函数说明
◆ ~Keyboard()
|
virtual |
成员函数说明
◆ getKeyFromScancode()
|
pure virtual |
Layout-aware key name for a physical scancode (SDL names).
在 eve::keyboard::sdl::Keyboard 内被实现.
◆ getScancodeFromKey()
|
pure virtual |
Physical scancode name for a layout-aware key (SDL names).
在 eve::keyboard::sdl::Keyboard 内被实现.
◆ hasKeyRepeat()
|
pure virtual |
True when key-repeat events are enabled.
在 eve::keyboard::sdl::Keyboard 内被实现.
◆ hasScreenKeyboard()
|
pure virtual |
True when the platform exposes an on-screen keyboard.
在 eve::keyboard::sdl::Keyboard 内被实现.
◆ hasTextInput()
|
pure virtual |
True while text-input / IME is active.
在 eve::keyboard::sdl::Keyboard 内被实现.
◆ isDown() [1/2]
|
pure virtual |
True if any of the named keys is currently down.
在 eve::keyboard::sdl::Keyboard 内被实现.
◆ isDown() [2/2]
|
pure virtual |
True if any key in the list is currently down.
在 eve::keyboard::sdl::Keyboard 内被实现.
◆ isScancodeDown() [1/2]
|
pure virtual |
True if any of the named physical scancodes is currently down.
在 eve::keyboard::sdl::Keyboard 内被实现.
◆ isScancodeDown() [2/2]
|
pure virtual |
True if any scancode in the list is currently down.
在 eve::keyboard::sdl::Keyboard 内被实现.
◆ Module_REG()
| eve::keyboard::Keyboard::Module_REG | ( | Keyboard | ) |
◆ setKeyRepeat()
|
pure virtual |
Whether held keys emit repeated keypressed events.
在 eve::keyboard::sdl::Keyboard 内被实现.
◆ setTextInput() [1/2]
|
pure virtual |
Enables or disables text-input / IME composition.
在 eve::keyboard::sdl::Keyboard 内被实现.
◆ setTextInput() [2/2]
|
pure virtual |
Hint where text appears so on-screen keyboards avoid covering it (pixel coords).
在 eve::keyboard::sdl::Keyboard 内被实现.
该类的文档由以下文件生成:
- src/modules/keyboard/Keyboard.h
- src/modules/keyboard/Keyboard.cpp
Public 成员函数 继承自