Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
KODI::KEYMAP::IKeyHandler Class Referenceabstract

Interface for handling keymap keys. More...

#include <IKeyHandler.h>

Inheritance diagram for KODI::KEYMAP::IKeyHandler:
KODI::KEYMAP::CKeyHandler

Public Member Functions

virtual ~IKeyHandler ()=default
 
virtual bool IsPressed () const =0
 Return true if the key is "pressed" (has a magnitude greater than 0.5)
 
virtual bool OnDigitalMotion (bool bPressed, unsigned int holdTimeMs)=0
 A key mapped to a digital feature has been pressed or released.
 
virtual bool OnAnalogMotion (float magnitude, unsigned int motionTimeMs)=0
 Callback for keys mapped to analog features.
 

Detailed Description

Interface for handling keymap keys.

Keys can be mapped to analog actions (e.g. "AnalogSeekForward") or digital actions (e.g. "Up").

Constructor & Destructor Documentation

◆ ~IKeyHandler()

virtual KODI::KEYMAP::IKeyHandler::~IKeyHandler ( )
virtualdefault

Member Function Documentation

◆ IsPressed()

virtual bool KODI::KEYMAP::IKeyHandler::IsPressed ( ) const
pure virtual

Return true if the key is "pressed" (has a magnitude greater than 0.5)

Returns
True if the key is "pressed", false otherwise

Implemented in KODI::KEYMAP::CKeyHandler.

◆ OnAnalogMotion()

virtual bool KODI::KEYMAP::IKeyHandler::OnAnalogMotion ( float magnitude,
unsigned int motionTimeMs )
pure virtual

Callback for keys mapped to analog features.

Parameters
magnitudeThe amount of the analog action
motionTimeMsThe time since the magnitude was 0
Returns
True if the key is mapped to an action, false otherwise

Implemented in KODI::KEYMAP::CKeyHandler.

◆ OnDigitalMotion()

virtual bool KODI::KEYMAP::IKeyHandler::OnDigitalMotion ( bool bPressed,
unsigned int holdTimeMs )
pure virtual

A key mapped to a digital feature has been pressed or released.

Parameters
bPressedtrue if the key's button/axis is activated, false if deactivated
holdTimeMsThe held time in ms for pressed buttons, or 0 for released
Returns
True if the key is mapped to an action, false otherwise

Implemented in KODI::KEYMAP::CKeyHandler.


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