I use the Mouse Gesture Redox addon for Firefox 3.4 which allows javascript to be added for a gesture.
I have found code which will perform different commands for the same gesture when a particular key is pressed. I would like the code to be disabled after each key press or a timeout (if a key is not pressed) until the same gesture is performed again.
My attempts at coding to produce this have not worked.
Can this be achieved?
porman9
I have found code which will perform different commands for the same gesture when a particular key is pressed. I would like the code to be disabled after each key press or a timeout (if a key is not pressed) until the same gesture is performed again.
My attempts at coding to produce this have not worked.
Can this be achieved?
porman9
Code:
document.onkeypress=detectKey;
function detectKey(e)
{
if(e.which==97){BrowserOpenAddonsMgr();}
else
if(e.which==100){gBrowser.loadOneTab(currURL, null, null, null, false, false);document.body.focus();}
else
if(e.which==110){mgB_OpenTab();}
else
if(e.which==109){mgW_MinWin();}
else
if(e.which==114){mgW_Restart();}
else
if(e.which==117){mgB_UndoCloseTab();}
}