Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
KODI::GAME::CAgentKeyboard Class Reference

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

#include <AgentKeyboard.h>

Inheritance diagram for KODI::GAME::CAgentKeyboard:
KODI::KEYBOARD::IKeyboardInputHandler

Public Member Functions

 CAgentKeyboard (PERIPHERALS::PeripheralPtr peripheral)
 
 ~CAgentKeyboard () override
 
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.
 
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.
 
- Public Member Functions inherited from KODI::KEYBOARD::IKeyboardInputHandler
virtual ~IKeyboardInputHandler ()=default
 

Detailed Description

Handles keyboard events for game agent functionality.

Constructor & Destructor Documentation

◆ CAgentKeyboard()

CAgentKeyboard::CAgentKeyboard ( PERIPHERALS::PeripheralPtr peripheral)

◆ ~CAgentKeyboard()

CAgentKeyboard::~CAgentKeyboard ( )
overridedefault

Member Function Documentation

◆ Appearance()

ControllerPtr KODI::GAME::CAgentKeyboard::Appearance ( ) const
inline

◆ ClearButtonState()

void CAgentKeyboard::ClearButtonState ( )

◆ 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.

◆ Deinitialize()

void CAgentKeyboard::Deinitialize ( )

◆ GetActivation()

float CAgentKeyboard::GetActivation ( ) const

◆ 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.

◆ Initialize()

void CAgentKeyboard::Initialize ( )

◆ 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: