Kodi Community Forum

Full Version: XBMC command for Volume Up/Down???
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey all,

just wondering the Command for the Volume Up/Down in a skin XML file. I want to add this function to a button. Is it something like <onlick>XBMC.MediPlayer(volumeup)</onlick> or something? Also is there a command for if the button is held the volume keeps increasing/decreasing until the button is released. I am in the middle of developing a skin for mouse/touch screen (when it is supported) and hence the xbox control stick for volume control is not available and so i need to have volume control attached to buttons.

Thanks
Actually, this is an undocumented feature Wink

You can use <onclick>command_from_keymap.xml</onclick> to access all the usual command functions.

eg:

<onclick>VolumeUp</onclick>
<onclick>VolumeDown</onclick>

will increase (or decrease) volume by 1% (0.6dB). Holding it down won't do anything, as the select button generally isn't repeating (not sure if this applies to the mouse or not.) You can change the amount of volume by just using multiple <onclick> tags

<onclick>VolumeUp</onclick>
<onclick>VolumeUp</onclick>
<onclick>VolumeUp</onclick>
<onclick>VolumeUp</onclick>
<onclick>VolumeUp</onclick>

will increase by 3dB (0.6 * 5)

I'll add a note to the online manual indicating that the <onclick> and <onfocus> items can contain keymap functions.

Cheers,
Jonathan
Thanks for that, so there is no way to make XBMC respond to buttons being held down?
Basically, yes. Any "held down" behaviour just causes repeats after a certain time. It's hardcoded in XBMC depending on the button (eg dpad navigation repeats, but select (A) doesn't). The remote always repeats I think.

Cheers,
Jonathan
Thanks heaps, it will be a mouse button press held down so will be interesting if this is hardcoded to repeat in xbmc... Anyway, thankyou for the quick repsonse. Its people like you who help progress by helping the less knowledgable Kiwis out.
Cheers

Stan