xbmc
Public Member Functions | List of all members
KODI::JOYSTICK::IKeyHandler Class Referenceabstract

Interface for handling keymap keys. More...

#include <IKeyHandler.h>

Inheritance diagram for KODI::JOYSTICK::IKeyHandler:
Inheritance graph
[legend]

Public Member Functions

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

Detailed Description

Interface for handling keymap keys.

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

Member Function Documentation

◆ IsPressed()

virtual bool KODI::JOYSTICK::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::JOYSTICK::CKeyHandler.

◆ OnAnalogMotion()

virtual bool KODI::JOYSTICK::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::JOYSTICK::CKeyHandler.

◆ OnDigitalMotion()

virtual bool KODI::JOYSTICK::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::JOYSTICK::CKeyHandler.


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