bootle
unread,Jul 25, 2010, 6:26:44 PM7/25/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to MooTools Users
Hey guys,
I have an interface that uses ajax to load internal links, but also
want to enable control/command-click when someone wants to open the
link in a new tab.
There's an event property event.control which works fine on windows,
but for the command key I had to add something like:
var cmdown = false;
window.addEvent('keydown', function(e){
if(e.code == 224){
cmdown = true;
}
});
window.addEvent('keyup', function(e){
if(e.code == 224){
cmdown = false;
}
});
Now, is there a better / native way to handle this?
Maybe just event.control should also == true when command is pressed?
Cheers