Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
Handles keyboard events for games. More...
#include <GameClientKeyboard.h>
Public Member Functions | |
CGameClientKeyboard (CGameClient &gameClient, std::string controllerId, KEYBOARD::IKeyboardInputProvider *inputProvider) | |
Constructor registers for keyboard events at CInputManager. | |
~CGameClientKeyboard () override | |
Destructor unregisters from keyboard events from CInputManager. | |
std::string | ControllerID () const override |
The add-on ID of the keyboard's controller profile. | |
bool | HasKey (const KEYBOARD::KeyName &key) const override |
Return true if the input handler accepts the given key. | |
bool | OnKeyPress (const KEYBOARD::KeyName &key, KEYBOARD::Modifier mod, uint32_t unicode) override |
A key has been pressed. | |
void | OnKeyRelease (const KEYBOARD::KeyName &key, KEYBOARD::Modifier mod, uint32_t unicode) override |
A key has been released. | |
const std::string & | GetControllerID () const |
const PERIPHERALS::PeripheralPtr & | GetSource () const |
float | GetActivation () const |
void | SetSource (PERIPHERALS::PeripheralPtr sourcePeripheral) |
void | ClearSource () |
Public Member Functions inherited from KODI::KEYBOARD::IKeyboardInputHandler | |
virtual | ~IKeyboardInputHandler ()=default |
Handles keyboard events for games.
Listens to keyboard events and forwards them to the games (as game_input_event).
CGameClientKeyboard::CGameClientKeyboard | ( | CGameClient & | gameClient, |
std::string | controllerId, | ||
KEYBOARD::IKeyboardInputProvider * | inputProvider ) |
Constructor registers for keyboard events at CInputManager.
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. |
|
override |
Destructor unregisters from keyboard events from CInputManager.
void CGameClientKeyboard::ClearSource | ( | ) |
|
overridevirtual |
The add-on ID of the keyboard's controller profile.
Implements KODI::KEYBOARD::IKeyboardInputHandler.
float CGameClientKeyboard::GetActivation | ( | ) | const |
|
inline |
|
inline |
|
overridevirtual |
Return true if the input handler accepts the given key.
key | A key belonging to the controller specified by ControllerID() |
Implements KODI::KEYBOARD::IKeyboardInputHandler.
|
overridevirtual |
A key has been pressed.
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 |
Implements KODI::KEYBOARD::IKeyboardInputHandler.
|
overridevirtual |
A key has been released.
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 |
Implements KODI::KEYBOARD::IKeyboardInputHandler.
void CGameClientKeyboard::SetSource | ( | PERIPHERALS::PeripheralPtr | sourcePeripheral | ) |