-
Notifications
You must be signed in to change notification settings - Fork 2
/
test.html
27 lines (27 loc) · 842 Bytes
/
test.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="jquery.keycombinator.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(':text').makeKeyCombinator({
defaultCombos: {
mac: ['⌃', 'F'],
win: ['Ctrl', 'F'],
unix: ['Ctrl', 'F']
},
onComplete: function(keyComboData){ console.log(keyComboData); }
});
});
</script>
</head>
<body>
<form>
Enter a key combination: <input type="text" name="keycombo" />
</form>
<button onclick="$(':text').clearKeyCombinator()">Clear</button>
<button onclick="$(':text').defaultKeyCombinator()">Reset to Default</button>
</body>
</html>