kodi
Public Member Functions | List of all members
KODI::GAME::CAgentKeyboard Class Reference

Handles keyboard events for game agent functionality. More...

#include <AgentKeyboard.h>

Inheritance diagram for KODI::GAME::CAgentKeyboard:
Inheritance graph
[legend]
Collaboration diagram for KODI::GAME::CAgentKeyboard:
Collaboration graph
[legend]

Public Member Functions

 CAgentKeyboard (PERIPHERALS::PeripheralPtr peripheral)
 
void Initialize ()
 
void Deinitialize ()
 
void ClearButtonState ()
 
float GetActivation () const
 
ControllerPtr Appearance () const
 
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...
 

Detailed Description

Handles keyboard events for game agent functionality.

Member Function Documentation

◆ ControllerID()

std::string CAgentKeyboard::ControllerID ( ) const
overridevirtual

The add-on ID of the keyboard's controller profile.

Returns
The ID of the controller profile add-on

Implements KODI::KEYBOARD::IKeyboardInputHandler.

◆ HasKey()

bool CAgentKeyboard::HasKey ( const KEYBOARD::KeyName key) const
overridevirtual

Return true if the input handler accepts the given key.

Parameters
keyA key belonging to the controller specified by ControllerID()
Returns
True if the key is used for input, false otherwise

Implements KODI::KEYBOARD::IKeyboardInputHandler.

◆ OnKeyPress()

bool CAgentKeyboard::OnKeyPress ( const KEYBOARD::KeyName key,
KEYBOARD::Modifier  mod,
uint32_t  unicode 
)
overridevirtual

A key has been pressed.

Parameters
keyA key belonging to the controller specified by ControllerID()
modA combination of modifiers
unicodeThe 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 CAgentKeyboard::OnKeyRelease ( const KEYBOARD::KeyName key,
KEYBOARD::Modifier  mod,
uint32_t  unicode 
)
overridevirtual

A key has been released.

Parameters
keyA key belonging to the controller specified by ControllerID()
modA combination of modifiers
unicodeThe unicode value associated with the key, or 0 if unknown

Implements KODI::KEYBOARD::IKeyboardInputHandler.


The documentation for this class was generated from the following files: