Posts: 1,234
Joined: Nov 2008
Reputation:
5
2011-04-13, 12:54
(This post was last modified: 2011-04-13, 12:56 by ekim232.)
So I recently created a wraplist for my osd buttons for musicosd.xml and then set the default control to my wrap list. Previously it was defaulted to my play/plause button which I believe just had a random id #. Now that my wraplist takes control, I cannot hit X (or any other keyboard command for player controls) on my keyboard to stop the music if the wraplist is focused. If I change the default control away from the wraplist, then I can use the keyboard commands. I tried to create a dummy button for default control and then just have it onfocus to the wraplist, but once the wraplist is focused, the commands once again stop.
I can hit "M" and the wraplist will gain or lose focus as it should. The player controls on my keyboard work just fine if it is not focused. If anyone has any idea why this might be happening I would greatly appreciate it. I am not sure if the buttons has specific ids that need to be put in. I checked a few skins and they all seem to use different ids and defaullt controls. Thanks to anyone who can assist
Posts: 17,409
Joined: Aug 2007
Reputation:
586
Hitcher
Team-Kodi Member
Posts: 17,409
I'd make a set of hidden buttons that do the controlling and base your wraplist on their focus.
Posts: 1,234
Joined: Nov 2008
Reputation:
5
I guess I am not sure what you are saying Hitcher.
I checked Ellipsis since it is the only other skin that uses a wraolist for the osd and it has the same problem. I have done some testing and if your default control is a list or wraplist then your keyboard commands do not respond.
Is this a xbmc bug?
Posts: 3,956
Joined: Dec 2008
Reputation:
62
I guess he meant making hidden buttons so that key binding continue to work and sending containermovefocus from hidden buttons to control the list scrolling.
Posts: 3,956
Joined: Dec 2008
Reputation:
62
On a second thought, it might be easier to duplicate functionality:
keep the buttons co they can react on keystrokes but put them out of screen coordinates ( <posy> -300</posy> ) and show wraplist as you intended. You will be duplicating the code but implementation and maintenance could be easier.
Posts: 1,234
Joined: Nov 2008
Reputation:
5
I do see what you are saying now, but I am not entirely sure it will work in my situtation.
I use the wraplist to control the movement of my icons which have a container.onnext, container.onprevious, and a static group. If a button besides the wraplist has focus, then how would I control the movement of them?
I need to prevent the wraplist from having focus in order to get the key commands to work, but continue to allow my icons to flow left and right with the animations I have in place for scrolling my wraplist.
Really I think that it sounds like a bug within XBMC. Is there a dev. that has any insight to this?
Posts: 1,234
Joined: Nov 2008
Reputation:
5
2011-04-14, 17:20
(This post was last modified: 2011-04-14, 17:22 by ekim232.)
I tried something very similiar to that as a test. I placed a play/pause button in my xml with an id of 602 like Confluence and made it my default control, just like Confluence as well. With the default being 602, the key commands worked as normal. The fault is that my wraplist is not usable because I can't control my icon button animations. I then changed the button id to a random number and it still allowed me to use key commands with the default matching it.
I then simply left the button as 602 in the code and changed my default to my wraplist id and the key commands will not work. I am pretty sure I have narrowed it down to the default control cannot be a list or wraplist. The key commands will only work if the wraplist is not focused. Once you hit "M" and it gains focus, the key commands become unusable. I personally will never use the osd buttons or even have it display for my setup, but I would like to make it work for other users that do require it.