<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=gbk" />
<title>
shortKeys jQuery plug-in
</title>
<style>
*{
font-size:14px;
}
</style>
<!-- jQuery -->
<script type="text/javascript" src="http://www.cssrain.cn/demo/JQuery+API/jquery-1[1].2.1.pack.js"></script>
<!-- shortKeys -->
<script src=http://www.cssrain.cn/demo/jquery-quickkey/jquery.shortkeys.js type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$(document).shortkeys({
'N': function () { $('#try_me').append('N<br />'); },
'M': function () { $('#try_me').append('M<br />'); },
'Space': function () { $('#try_me').append('Space<br />'); },
'V': function () { $('#try_me').append('V<br />'); },
't+y': function () { $('#try_me').append('T+Y<br />'); },
't+u': function () { $('#try_me').append('T+U<br />'); }
});
});
</script>
</head>
<body id="top">
<div id="ctr">
<div id="light" class="clear">
<div class="clear">
<div id="body" class="layout_main">
<h3>shortKeys jQuery plug-in</h3>
<h3 id="examples">Examples</h3>
<div id="try_me">
<p>输入以下键:</p>
<ul>
<li>n</li>
<li>m</li>
<li>Space</li>
<li>v</li>
<li>t and y</li>
<li>t and u</li>
</ul>
</div>
<h3 id="usage">用法:</h3>
<div class="code">
$(document).shortkeys(json_obj, options);
</div>
<p>or</p>
<div class="code">
$(document).keys(json_obj, options);
</div>
<h3 id="options">属性:</h3>
<dl>
<dt>split</dt>
<dd>String to split keystring into separate keys</dd>
<dd class="default">default: '+'.</dd>
<dt>moreKeys</dt>
<dd>For adding more keys to the database.</dd>
<dd class="default">takes: { 'Keystring': keyCode } e.g. { 'Space': 32, '.': 190 } default: {}</dd>
</dl>
<h3 id="known_bugs">bug:</h3>
<ul>
<li>Won't work with Shift, Alt, Ctrl keys in Safari </li>
<li>Some clashes with browser shortcuts, especially in Opera</li>
</ul>
</div>
</div>
</div>
<div id="dark" class="clear">
</div>
</div>
</body>
</html>