Kodi Development  20.0
for Binary and Script based Add-Ons

Detailed Description

Action class.

Class: xbmcgui.Action():

This class serves in addition to identify carried out kodi_key_action_ids of Kodi and to be able to carry out thereby own necessary steps.

The data of this class are always transmitted by callback Window::onAction at a window.

Function Documentation

◆ getId()

getId ( )

Function: getId()


To get kodi_key_action_ids

This function returns the identification code used by the explained order, it is necessary to determine the type of command from kodi_key_action_ids.

Returns
The action's current id as a long or 0 if no action is mapped in the xml's.

Example:

..
def onAction(self, action):
if action.getId() == ACTION_PREVIOUS_MENU:
print('action received: previous')
..

◆ getButtonCode()

getButtonCode ( )

Function: getButtonCode()


Returns the button code for this action.

Returns
[integer] button code

◆ getAmount1()

getAmount1 ( )

Function: getAmount1()


Returns the first amount of force applied to the thumbstick.

Returns
[float] first amount

◆ getAmount2()

getAmount2 ( )

Function: getAmount2()


Returns the second amount of force applied to the thumbstick.

Returns
[float] second amount