Question about actionID,buttonid and thumb sticks
#1
Can anyone clear up a few points for me;

When using WindowXML or DialogXML and their onAction()

1) against the param 'action', should I be trapping action.getId() or just acting purely upon action.getButtonCode() ?

I ask as the thumb sticks don't seem consotent in their actionID reporting.

eg
left stick gives no actionID (0) AND a buttonCode in (280, 281, 282, 283)

for right thumb stick, actionID in (88, 89, 124, 125) AND a buttonCode in (266, 267, 268, 269)

so, why no actionID for left thumb stick ?

2) When onAction() traps a buttonCode for right thumb stick UP or DOWN and does <my own action> it still causes the volume control to be displayed.
How can I prevent the volume control from receiving an action?
Can it be disabled via a skin builtin ?

3) If you use a thumbstick it calls onAction repeatedly, I have to set a 'ready' flag to ignore following unwanted onAction calls, setting 'ready' ok when processing of the first onAction() is complete.
Is this the correct behaviour ?

These question have come about as I'm updating more of my scripts on be XML based.

Anyone help ?
BBB
Retired from Add-on dev
Reply
#2
1. I wouldn't use buttoncode unless you need thumbsticks or triggers, just use action. i learned that i did not have all codes for controllers available to linux. so i switched back to just the action. no need for getId()

2. there was a patch to prevent that i thought, but it may have been taken out. i don't see anything in the manual, so it is expected behavior. Smile

3. look at "Ambient Light Control Pad" in scripting svn on how to use thumbsticks.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#3
yeah. buttonCode just for thumb sticks, seems most reliable and it does seem to be working if i use my own 'ready' flag. bit of a bodge thou.

I looked at your ALCP but you just use left thumbstick.
It is just the up/down on right thumb stick thats giving me the unwanted volume control animation. I'll just have to not use it.

cheers
Retired from Add-on dev
Reply
#4
that's what i did, just not use it. Volume is globally mapped.

i'm almost positive there was a patch by asteron to do what you want, but it must have been removed.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply

Logout Mark Read Team Forum Stats Members Help
Question about actionID,buttonid and thumb sticks0