python script to execute multiple actions on one keypress?

  • I've added the following to my keymap and I can see from the logs that the script executes on key press. But nothing seems to happen.

    Code
    <key id="61467">RunScript(/storage/.kodi/userdata/Scripts/backpause.py)</key>

    Which leads me to the script - pieced together from searching online.

    Code
    import xbmc
    xbmc.executebuiltin( "XBMC.Action(Pause)" )
    xbmc.executebuiltin( "XBMC.Action(Back)" )

    The has worked for others on the kodi forums, but perhaps the information is outdated.
    Is there any obvious or libreelec-specific reason why this doesn't appear to do anything?

    Thanks for reading & any info or hints at how to debug much appreciated!

  • Nevermind, solved!
    The information for the python script I was working off must have been outdated.

    I'll leave the solution below should anyone have the same query:

    Code
    import xbmc
    xbmc.executebuiltin('Action(PlayPause)')
    xbmc.executebuiltin('Action(Back)')