Core Context Menu bug
#1
I'm posting this here as it's an issue I'm running into when developing a skin, however I think it may be a core Kodi issue?

In my Library View I have my main Library container and also a secondary container with other related content. The problem is that for items in the main library view I can press 'c' and the context menu pops up fine, however the context menu wont appear for items in the secondary container when pressing 'c'

The problem gets stranger when I highlight an item in the secondary container using a mouse and then press the right mouse button and the context menu for that item pops up fine.

So the issue isn't that the context menu doesn't work/exist for the secondary container but that you can't access it using the 'c' key or any context menu button on a remote.... but you can access it using a right mouse click.

This problem can be easily demoed using the Amber skin:-

1. Set your TV Show view to 'Triple' then highlight any tv show item in the first column using a keyboard/remote and press 'c' to correctly bring up the context menu.
2. Now move over to either the season or episode column using the remote/keyboard and press 'c' the context menu wont appear.
3. Now using a mouse highlight an item from either seasons or episodes and right click and the context menu appears perfectly fine  Confused


The only other mention of this issue I can find is here: https://forum.kodi.tv/showthread.php?tid=340295

I've opened an issue on github:- https://github.com/xbmc/xbmc/issues/20285

Any ideas?
Reply
#2
got the same issue, reported a while back
https://forum.kodi.tv/showthread.php?tid=340295

seems at current state is use custom context menu script.
got it on my to do, to test.
though unsure if it can be done, just did a quick lookup
here...
https://codedocs.xyz/AlwinEsch/kodi/clas...05b3f2eda7

or
https://codedocs.xyz/AlwinEsch/kodi/clas...05c53cf34d
Skins |  Titan M O D   •   S W A N (WIP)
Reply
#3
(2021-10-09, 20:54)mardukL Wrote: got the same issue, reported a while back
https://forum.kodi.tv/showthread.php?tid=340295

seems at current state is use custom context menu script.
got it on my to do, to test.
though unsure if it can be done, just did a quick lookup
here...
https://codedocs.xyz/AlwinEsch/kodi/clas...05b3f2eda7

or
https://codedocs.xyz/AlwinEsch/kodi/clas...05c53cf34d
Yep, that was the thread I was referring to.

I'm confused.... I'm not sure how a custom context menu script going to help when the problem is you can't access the context menu?

As I posted this seems to be a problem in Kodi itself, probably not skin related.

For some reason in the library only the control/container with the current view id is able to open a context menu using the keyboard/remote control where as for any other control/container the context menu can only be opened using a mouse.
Reply
#4
Indeed i am wiith you, that the contextmenu mouse/touch action should be working also for keyboard action.

So that the contextmenu opens independent from beeing in a media window + container content.
It should have the actions based on dbtype.

Build a contextmenu addon is just an idea to circumstance the current behaviour.Till someone with the needed aknowledgement will take a look and can provide a fix.
( i for myself just get started with some basics in py, and will try when i found time,


little offtopic
e.g. i also got problems with queue|add to playlist, for items in dynamic container outside of media windows.
https://forum.kodi.tv/showthread.php?tid=364611

so i started creating one.though i am not a good coder...

https://github.com/marduklev/repository....0.0.03.zip
Skins |  Titan M O D   •   S W A N (WIP)
Reply
#5
(2021-10-10, 12:31)mardukL Wrote: Build a contextmenu addon is just an idea to circumstance the current behaviour.

This is the bit I'm not understanding.

The current behaviour is that you can only open the context menu for non view containers/controls in the library using a mouse. So even if you build a context menu addon you'll still only be able to open the context menu using a mouse, nothing changed.

As I said I've opened an issue on github. Hopefully somebody picks up on the issue and knows how to fix it.
Reply
#6
(2021-10-10, 13:06)roidy Wrote:
(2021-10-10, 12:31)mardukL Wrote: Build a contextmenu addon is just an idea to circumstance the current behaviour.

This is the bit I'm not understanding.

The current behaviour is that you can only open the context menu for non view containers/controls in the library using a mouse. So even if you build a context menu addon you'll still only be able to open the context menu using a mouse, nothing changed.

As I said I've opened an issue on github. Hopefully somebody picks up on the issue and knows how to fix it.


You define the visibility of your contextitem via a vis condition in the addon xml of the context addon.

a simple example -
enable possibilty to open centextmenu if condition match, even if script has no actions

xml:
<?
xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="context.test" name="test" version="0.0.03" provider-name="marduk">
<requires>
<import addon="xbmc.python" version="3.0.0"/>
</requires>
<extension point="kodi.context.item">
<menu id="kodi.core.main">

<item library="scriptname.py">
<label>toggle watched</label>
<visible>Container.Content(TVshows) + string.isequal(listitem.dbtype,episode)</visible>
</item>
</menu>
</extension>
<extension point="kodi.addon.metadata">
<platform>all</platform>
<summary lang="en_GB">summary</summary>
<description lang="en_GB">description</description>
<license>GPL-2.0-or-later</license>
<forum />
<source />
<assets>
<icon>resources/art/icon.png</icon>
<fanart>resources/art/fanart.png</fanart>
</assets>
</extension>
</addon>

so the context menu opens with your item and perorm the actions in your script.

But yes, hope it gets a fix by core too
Skins |  Titan M O D   •   S W A N (WIP)
Reply
#7
Yes, I know how a context menu addon works and how different menu items are added depending on visibility or database type.

I think we are taking about two completely different context menu issues here, my issue has nothing to do with entries not being available in the context menu. It's that you can't open the context menu at all.

My issue is that say you are in View_50_List then for any item in control id=50 the context menu can be opened using the 'c' on the keyboard or the context menu button on a remote control. However if you place another list in that view with say control id=600 then you can't open the context menu for items in that list using 'c' or a remote control but you can open the context menu using a mouse and right click.
Reply
#8
may my english is too bad -)

i get you and the issue itself. ( as i request a solution for the same thing 2years ago )

my suggestion was just create the action via script to circumstance the core issue if you/someone will try a workaround via addon for
a) contextmenu wont open ( if not using using mouse|touch)
b) no actions possible ( will need define script)

so
if you are in view id 50 when container content tvshows is present but click key "c" on episose in the dynamic custom container ( id 5678)
will open the contextmenu, so that you can perform a script action.

the context menu will DEFINETLY will be open and avail (if addon.xml item visibility contition is true) but script has to be written, though...the menu will open even if scriptname.py is not defined.

cant do stuff atm, not in front of a working device.
Skins |  Titan M O D   •   S W A N (WIP)
Reply
#9
(2021-10-10, 15:01)mardukL Wrote: if you are in view id 50 when container content tvshows is present but click key "c" on episose in the dynamic custom container ( id 5678)
will open the contextmenu, so that you can perform a script action.

But this is the issue it won't open the context menu. In your example you can open the context menu on control 50 perfectly find but once you move to control 5678 episodes you can no longer open the context menu.

I'm sorry it must be a language issue here but I think we are going around in circles.

It does not matter what context menu addon you create or what addon.xml conditions you set for it. You will never be able to access it if you can't even open the context menu to start with. Trust me I've tried.

As a demo download a install this simple context menu addon, all it does is add a context menu entry just for dbtype episodes that pops up a notification. 

https://github.com/roidy/skin.gtv/releas...ogtest.zip

Now the easiest way to test this is using the Amber skin

Go to TV Shows and set the view type to 'Triple', this gives 3 list controls the left one TV Shows which is the main view and the context menu works perfectly find for this
The middle and right lists are season and episode, neither of these two lists can open the context menu using 'c' or a remote. The only way to open the context menu on these two lists is using a mouse.

No amount of context menus addons, regardless of visibility conditions is going to change the fact you just can't open the context menu.


Here's two videos that perfectly demonstrate the issue.

Video 1 Using a remote control the context menu is only accessible on the first list
https://streamable.com/uebp0v

Video 2 Using a mouse the context menu is accessible on all three lists
https://streamable.com/v3oy6y
Reply
#10
(2021-10-10, 15:51)roidy Wrote:
(2021-10-10, 15:01)mardukL Wrote: if you are in view id 50 when container content tvshows is present but click key "c" on episose in the dynamic custom container ( id 5678)
will open the contextmenu, so that you can perform a script action.

But this is the issue it won't open the context menu. In your example you can open the context menu on control 50 perfectly find but once you move to control 5678 episodes you can no longer open the context menu.

I'm sorry it must be a language issue here but I think we are going around in circles.

It does not matter what context menu addon you create or what addon.xml conditions you set for it. You will never be able to access it if you can't even open the context menu to start with. Trust me I've tried.

As a demo download a install this simple context menu addon, all it does is add a context menu entry just for dbtype episodes that pops up a notification. 

https://github.com/roidy/skin.gtv/releas...ogtest.zip

Now the easiest way to test this is using the Amber skin

Go to TV Shows and set the view type to 'Triple', this gives 3 list controls the left one TV Shows which is the main view and the context menu works perfectly find for this
The middle and right lists are season and episode, neither of these two lists can open the context menu using 'c' or a remote. The only way to open the context menu on these two lists is using a mouse.

No amount of context menus addons, regardless of visibility conditions is going to change the fact you just can't open the context menu.


Here's two videos that perfectly demonstrate the issue.

Video 1 Using a remote control the context menu is only accessible on the first list
https://streamable.com/uebp0v

Video 2 Using a mouse the context menu is accessible on all three lists
https://streamable.com/v3oy6y

Got, it.

My mistake was assuming, providing custom entrys can resolve the "availability" issue.

Sorry, for confusing.
Also tested provide a button within the dialogcontextmenu.xml itself in the grouplist (id=996)
  
xml:
<control type="button" id="769">
                <label>[COLOR orange]skinned :[/COLOR]test</label>
                <texturefocus />
                <texturenofocus />
                <width>450</width>
                <align>center</align>
                <font>InfoCommon</font>
                <onclick>Action(ToggleWatched)</onclick>
            </control>

which result in the same issue. Contextmenu is not avail.
Skins |  Titan M O D   •   S W A N (WIP)
Reply
#11
(2021-10-10, 16:51)mardukL Wrote: My mistake was assuming, providing custom entrys can resolve the "availability" issue.

Yep, unfortunately it's not that the content menu items are not available, but that the whole context menu just isn't able to be opened Sad

No problem I know the language barrier can be difficult some time, thank you for taking the time and trying to help Smile
Reply
#12
(2021-10-10, 15:51)roidy Wrote: Here's two videos that perfectly demonstrate the issue.

Video 1 Using a remote control the context menu is only accessible on the first list
https://streamable.com/uebp0v

Video 2 Using a mouse the context menu is accessible on all three lists
https://streamable.com/v3oy6y

Thanks for pointing to this! I don't use the mouse in my skin so I had taken for granted that context menu only was available in the parent control no matter what. Thanks for your videos. It's been great to see that context menu can also be available in the nested controls, I for sure join your request about equal rights for keyboards... Wink
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
#13
(2021-10-11, 16:41)manfeed Wrote: Thanks for pointing to this! I don't use the mouse in my skin so I had taken for granted that context menu only was available in the parent control no matter what. Thanks for your videos. It's been great to see that context menu can also be available in the nested controls, I for sure join your request about equal rights for keyboards... Wink

Lol... yep, I was under the same impression. I only found out by accident when testing something else using Kodi on my PC with a mouse, which I rarely ever do.

enen92 has now created a patch for this issue, and after testing I can confirm it fixes the problem.
Reply

Logout Mark Read Team Forum Stats Members Help
Core Context Menu bug0