If you bind a combo like ctrl+enter on OS X, hold down the commend key and any other button (enter for example) you are able to “freeze” that button jKey's activeKeys array:
Let go of the enter button while still holding the command button; you'll notice that no keyup event was fired for the enter button. Thus the activeKeys array within still contains the pressed enter key.
Now you can trigger the ctrl+enter combo callback whenever you hit ctrl – no need to hit enter anymore, since it's registered as 'activeKey' forever... well until you hit enter again.
$(document).jkey('ctrl+enter',function(){
jkey.log('You pressed the enter+ctrl key.');
});
That also makes combos with the command button impossible.
I also noticed that jkey binds the keyCode 224 for the command button but it's different in all the browsers:
If you bind a combo like ctrl+enter on OS X, hold down the commend key and any other button (enter for example) you are able to “freeze” that button jKey's activeKeys array: Let go of the enter button while still holding the command button; you'll notice that no keyup event was fired for the enter button. Thus the activeKeys array within still contains the pressed enter key. Now you can trigger the ctrl+enter combo callback whenever you hit ctrl – no need to hit enter anymore, since it's registered as 'activeKey' forever... well until you hit enter again.
That also makes combos with the command button impossible. I also noticed that jkey binds the keyCode 224 for the command button but it's different in all the browsers: