I use the below ProntoScript to accomplish this. A normal button press will invoke one function. An extended button press will invoke another. Works beautifully.
Place the below ProntoScript on your Firm Key...
counter=0; onHold=function(){counter++; if(counter===1){doFirm3Ext();}};
onHoldInterval=1000; onRelease=function(){if(counter===0){doFirm3();}};At the activity level you'd place your functions...
//CF.widget("Button PS Tag","Page PS Tag","Device PS Tag").executeActions();function doFirm3Ext() {
CF.widget("Stop","Humax HDR-2000T PVR","Commands").executeActions();
}
function doFirm3() {
CF.widget("Play/Pause","Humax HDR-2000T PVR","Commands").executeActions();
}I use this "Press & Hold" functionality throughout my configuration file. In fact, I have some activities where nearly every hard button does this. My configuration file is available for download
here if you'd like to check out a real world example. Enjoy!
Last edited by Lowpro on March 31, 2019 13:07.