Open 0rt opened 12 years ago
I want to combine 2 similar feature in same gesture, press a key to switch between them:
var BBcode = false; function listener(e){ if(e.keyCode == 81){ // press Q switch to feature A, else feature B BBcode= true; } } document.addEventListener('keydown', listener ,false); document.removeEventListener('keydown',listener,false); if ( BBcode ){ // feature A } else { // feature B }
but it doesn't work, any clue?
var BBcode = false; if(event.DOM_VK_Q){BBcode = true;}; alert(BBcode);
just try the FG api event, still no good, always prompt false
I want to combine 2 similar feature in same gesture, press a key to switch between them:
but it doesn't work, any clue?