Handles keyboard events for games.
More...
#include <GameClientKeyboard.h>
|
| CGameClientKeyboard (CGameClient &gameClient, std::string controllerId, KEYBOARD::IKeyboardInputProvider *inputProvider) |
| Constructor registers for keyboard events at CInputManager. More...
|
|
| ~CGameClientKeyboard () override |
| Destructor unregisters from keyboard events from CInputManager.
|
|
std::string | ControllerID () const override |
| The add-on ID of the keyboard's controller profile. More...
|
|
bool | HasKey (const KEYBOARD::KeyName &key) const override |
| Return true if the input handler accepts the given key. More...
|
|
bool | OnKeyPress (const KEYBOARD::KeyName &key, KEYBOARD::Modifier mod, uint32_t unicode) override |
| A key has been pressed. More...
|
|
void | OnKeyRelease (const KEYBOARD::KeyName &key, KEYBOARD::Modifier mod, uint32_t unicode) override |
| A key has been released. More...
|
|
const std::string & | GetControllerID () const |
|
const PERIPHERALS::PeripheralPtr & | GetSource () const |
|
void | SetSource (PERIPHERALS::PeripheralPtr sourcePeripheral) |
|
void | ClearSource () |
|
Handles keyboard events for games.
Listens to keyboard events and forwards them to the games (as game_input_event).
◆ CGameClientKeyboard()
Constructor registers for keyboard events at CInputManager.
- Parameters
-
gameClient | The game client implementation. |
controllerId | The controller profile used for input |
dllStruct | The emulator or game to which the events are sent. |
inputProvider | The interface providing us with keyboard input. |
◆ ControllerID()
std::string CGameClientKeyboard::ControllerID |
( |
| ) |
const |
|
overridevirtual |
◆ HasKey()
bool CGameClientKeyboard::HasKey |
( |
const KEYBOARD::KeyName & |
key | ) |
const |
|
overridevirtual |
◆ OnKeyPress()
bool CGameClientKeyboard::OnKeyPress |
( |
const KEYBOARD::KeyName & |
key, |
|
|
KEYBOARD::Modifier |
mod, |
|
|
uint32_t |
unicode |
|
) |
| |
|
overridevirtual |
A key has been pressed.
- Parameters
-
key | A key belonging to the controller specified by ControllerID() |
mod | A combination of modifiers |
unicode | The unicode value associated with the key, or 0 if unknown |
- Returns
- True if the event was handled, false otherwise
Implements KODI::KEYBOARD::IKeyboardInputHandler.
◆ OnKeyRelease()
void CGameClientKeyboard::OnKeyRelease |
( |
const KEYBOARD::KeyName & |
key, |
|
|
KEYBOARD::Modifier |
mod, |
|
|
uint32_t |
unicode |
|
) |
| |
|
overridevirtual |
The documentation for this class was generated from the following files: