vui document

Class: hotkey

快捷键设置

Author: putaoshu@126.com.
View source: hotkey.js.

Arguments:

vui.hotkey (event, key, name, callback)

  1. event - (String) keydown 其它为keypress|keyup
  2. key - (String) 键值esc,enter...
  3. name - (String) 快捷键对应回调时会用的名称
  4. callback - (Function) 回调函数

Example:

vui.hotkey({event:'keydown',key:'enter',name:'hotkeyName'},function(){
	 alert('todo');
});