-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdemo.html
34 lines (34 loc) · 810 Bytes
/
demo.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>keydecode test</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script src="keyDecode.js"></script>
<script>
$(function() {
$(document).keydown(function(e) {
$('#key').text(keyDecode(e));
if (!e.shiftKey && !e.ctrlKey) {
e.preventDefault();
}
});
});
</script>
<style type="text/css">
body {
background-color: #0a0000;
font-family: arial;
color: #eaffb9;
text-shadow: 3px 3px 5px #980000;
}
#key {
margin-top: 20%;
font-size: 8em;
text-align: center;
}
</style>
</head>
<body>
<div id="key">press a key</div>
</body>
</html>