This repository has been archived by the owner on Jun 28, 2022. It is now read-only.
forked from steveh/usblauncher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
60 lines (58 loc) · 1.37 KB
/
index.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<style>
td {
font-size: 72pt;
text-align: center;
padding: 20px;
}
</style>
<table>
<tr>
<td>
<td>
<td><a href="/up/1000">⇈
<tr>
<td>
<td>
<td><a href="/up/100">↑
<tr>
<td><a href="/left/1000">⇇
<td><a href="/left/100">←
<td><a href="/fire/1">☠
<td><a href="/right/100">→
<td><a href="/right/1000">⇉
<tr>
<td>
<td>
<td><a href="/down/100">↓
<tr>
<td>
<td>
<td><a href="/down/1000">⇊
</table>
<script src="https://www.localist.co.nz/public/javascripts/jquery.hotkeys.js" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script>
$("a").click(function (event) {
event.preventDefault();
$.ajax($(this).attr("href"));
});
var commands = [
["shift+s shift+down", "/down/500"],
["s down", "/down/100"],
["shift+w shift+up", "/up/500"],
["w up", "/up/100"],
["shift+a shift+left", "/left/500"],
["a left", "/left/100"],
["shift+d shift+right", "/right/500"],
["d right", "/right/100"],
["1 space", "/fire/1"],
["2", "/fire/2"],
["3", "/fire/3"],
["4", "/fire/4"],
]
$.each(commands, function(index, command){
$(document).bind('keydown', command[0], function(){
$.get(command[1])
})
})
</script>