2013-03-26 63 views

回答

3

还有Mousetrap。看看下面的例子代码:

Mousetrap.bind('t', function() { 
    // do something 
}); 

它还支持组合:

Mousetrap.bind(['command+k', 'ctrl+k'], function(e) { 
    // do something 
} 
+0

感谢。正是我在找什么。 – wayfare 2013-03-26 18:39:05