Base class for mappings that bind a keyboard key to any controller input.
More...
#include <KeyboardKeyToAnyMapping.h>
Base class for mappings that bind a keyboard key to any controller input.
Provides shared keyboard event processing and physical device/input name reporting. Concrete subclasses (KeyboardKeyToButtonMapping, KeyboardKeyToAxisDirectionMapping) add the target input semantics.
◆ KeyboardKeyToAnyMapping()
| Ship::KeyboardKeyToAnyMapping::KeyboardKeyToAnyMapping |
( |
KbScancode |
scancode, |
|
|
std::shared_ptr< Window > |
window |
|
) |
| |
Constructs a keyboard-key mapping for the given scan code.
- Parameters
-
| scancode | The keyboard scan code to bind. |
◆ ~KeyboardKeyToAnyMapping()
| virtual Ship::KeyboardKeyToAnyMapping::~KeyboardKeyToAnyMapping |
( |
| ) |
|
|
virtual |
◆ GetPhysicalDeviceName()
| std::string Ship::KeyboardKeyToAnyMapping::GetPhysicalDeviceName |
( |
| ) |
|
|
overridevirtual |
◆ GetPhysicalInputName()
| std::string Ship::KeyboardKeyToAnyMapping::GetPhysicalInputName |
( |
| ) |
|
|
overridevirtual |
◆ ProcessKeyboardEvent()
Processes a raw keyboard event and updates the internal pressed state.
- Parameters
-
| eventType | The type of keyboard event (key-down, key-up, or all-keys-up). |
| scancode | The scan code associated with the event. |
- Returns
- true if this mapping's key was affected by the event.
◆ mKeyboardScancode
| KbScancode Ship::KeyboardKeyToAnyMapping::mKeyboardScancode |
|
protected |
◆ mKeyPressed
| bool Ship::KeyboardKeyToAnyMapping::mKeyPressed |
|
protected |
◆ mWindow
| std::shared_ptr<Window> Ship::KeyboardKeyToAnyMapping::mWindow |
|
protected |
The documentation for this class was generated from the following file: