Technology
 

Category talk:Resources

From Unofficial Konfabulator Wiki

From a post by Drevor I found: http://www2.konfabulator.com/forums/index.php?showtopic=10908&view=findpost&p=58719

HotKey.prototype.setHotKey=function(para)
{
   if ( (para==undefined) || (para=="") ) return log("HotKey preferences String not defined");
   para=String(para).split("+");
   var key=para.pop();
   if ( ( parseFloat(konfabulatorVersion())<3) && (system.platform=="windows") )
   {                    //Konfabulator Version 2.1.1 or lower, fixing modifiers...
       for (var i=0;i<para.length;i++)
           if (para[i]=="Alt") para[i]="Shift";
           else if (para[i]=="Shift") para[i]="Alt";
   }
   var mod=para.join("+");
   this.modifier=mod;
   this.key=key;
//    log("key: "+key+"("+this.key+") / modifier: "+mod+"("+this.modifier+")");
}
//set up the Hotkey as usual
var myHotkey=new Hotkey();
//call the new Method with ur preferences value as parameter
myHotkey.setHotKey(preferences.myHotkey.value)