kodi
Public Member Functions | List of all members
KODI::KEYMAP::CKeyHandler Class Reference
Inheritance diagram for KODI::KEYMAP::CKeyHandler:
Inheritance graph
[legend]
Collaboration diagram for KODI::KEYMAP::CKeyHandler:
Collaboration graph
[legend]

Public Member Functions

 CKeyHandler (const std::string &keyName, ACTION::IActionListener *actionHandler, const IKeymap *keymap, IKeymapHandler *keymapHandler)
 
bool IsPressed () const override
 Return true if the key is "pressed" (has a magnitude greater than 0.5) More...
 
bool OnDigitalMotion (bool bPressed, unsigned int holdTimeMs) override
 A key mapped to a digital feature has been pressed or released. More...
 
bool OnAnalogMotion (float magnitude, unsigned int motionTimeMs) override
 Callback for keys mapped to analog features. More...
 

Member Function Documentation

◆ IsPressed()

bool KODI::KEYMAP::CKeyHandler::IsPressed ( ) const
inlineoverridevirtual

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

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

Implements KODI::KEYMAP::IKeyHandler.

◆ OnAnalogMotion()

bool CKeyHandler::OnAnalogMotion ( float  magnitude,
unsigned int  motionTimeMs 
)
overridevirtual

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

Implements KODI::KEYMAP::IKeyHandler.

◆ OnDigitalMotion()

bool CKeyHandler::OnDigitalMotion ( bool  bPressed,
unsigned int  holdTimeMs 
)
overridevirtual

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

Implements KODI::KEYMAP::IKeyHandler.


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