notrobro icon indicating copy to clipboard operation
notrobro copied to clipboard

"Skip" button unclickable with controller input

Open Ruthalas opened this issue 4 years ago • 1 comments

(Thanks for the guidance setting this up!)

At the moment, if a controller is in use, rather than a mouse, when the Skip button appears, it cannot be selected or activated, and also prevents the normal play/pause menu from being selected.

If cursor input is used on the same machine, with the same file, the Skip button can be pressed when it appears, and it behaves as anticipated.

I did a little digging, and a partial fix may be using self.setFocus(....) to set the focus on the skip button? This might at least permit the skip button to be pressed via controller, even if it still locks out the normal menu.

Ruthalas avatar Jan 25 '20 03:01 Ruthalas

to focus the skip button, define a default control in the .xml file

<window>
	<defaultcontrol>1</defaultcontrol>
	<zorder>0</zorder>
	...

to get access to the osd menu, you'll need to use the onAction method in skip.py https://codedocs.xyz/xbmc/xbmc/group__python__xbmcgui__window__cb.html#ga2221042e947177b98a03a1002b029c75

    def onAction(self, action):
        actionId = action.getId()
        if actionId in (107, 163,):
            xbmc.executebuiltin('ActivateWindow(videoosd)')

may i suggest you start with changing something else first... currently to dialog window is launched when the service starts (ie. at kodi startup) and this will lead to issues one way or another. it would be better to launch the dialog only when a user enters the fullscreen video window, and make sure to close the dialog when the users exits the fullscreen video window.

ronie avatar Feb 04 '20 00:02 ronie