forked from toptal/keycodes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
99 lines (90 loc) · 4.05 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>JavaScript Event KeyCodes</title>
<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin>
<link href='https://fonts.googleapis.com/css?family=Montserrat' rel='stylesheet' type='text/css'>
<meta name="viewport" content="width=device-width, user-scalable=no">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="JavaScript Event KeyCodes">
<meta name="twitter:description" content="Keycode testing tool - which keys map to which keycodes?">
<meta name="twitter:creator" content="@wesbos">
<meta name="twitter:image" content="https://cdn1.imggmi.com/uploads/2019/7/12/f6b03f5628f7850649714200ab517a52-full.png">
<link rel="stylesheet" href="style.css?v=06272019">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/noty/3.1.4/noty.min.css" />
<link rel="icon" href="">
</head>
<body>
<canvas width="128" height="128" hidden></canvas>
<div class="display">
<table class="table hide">
<thead>
<tr>
<th>Key Code</th>
<th>Key</th>
</tr>
</thead>
<tbody class="table-body">
</tbody>
</table>
<div class="wrap" aria-live="polite" aria-atomic="true">
<p class="keycode-display"></p>
<p class="text-display">Press any key to get the JavaScript event keycode</p>
<div class="cards hide">
<div class="card item-key">
<div class="card-header">event.key</div>
<div class="card-main">
<div class="main-description">key</div>
</div>
</div>
<div class="card item-location">
<div class="card-header">event.location
<a href="https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/location" target="_blank" rel="noopener"
class="more-info"></a>
</div>
<div class="card-main">
<div class="main-description">location</div>
</div>
</div>
<div class="card item-which">
<div class="card-header">
event.which
<a href="https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent" target="_blank" rel="noopener"
class="deprecated-link">(deprecated)</a>
</div>
<div class="card-main">
<div class="main-description">which</div>
</div>
</div>
<div class="card item-code">
<div class="card-header">event.code</div>
<div class="card-main">
<div class="main-description">code</div>
</div>
</div>
</div>
<div class="mobile-input">
</div>
</div>
<button onclick={toggleTable()} class="table-toggle-button">Table</button>
</div>
<span class="love">Made with love by
<a href="https://wesbos.com" target="_blank" rel="noopener">Wes Bos</a> — fork or suggest edits on
<a href="https://github.com/wesbos/keycodes" target="_blank" rel="noopener">GitHub</a> —
<a href="https://twitter.com/wesbos" class="twitter-follow-button" data-show-count="false" target="_blank" rel="noopener">Follow
@wesbos</a>
<a href="https://twitter.com/share" class="twitter-share-button" data-url="https://keycode.info" data-text="Nice tool for finding JavaScript event keycodes"
data-via="wesbos" data-related="wesbos" target="_blank" rel="noopener">Tweet</a>
</span>
<script type='text/javascript'>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('./service-worker.js');
}
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/noty/3.1.4/noty.min.js"></script>
<script src="scripts.js?v=06272019"></script>
<script src="google-analytics.js"></script>
<script>!function (d, s, id) { var js, fjs = d.getElementsByTagName(s)[0], p = /^http:/.test(d.location) ? 'http' : 'https'; if (!d.getElementById(id)) { js = d.createElement(s); js.id = id; js.src = p + '://platform.twitter.com/widgets.js'; fjs.parentNode.insertBefore(js, fjs); } }(document, 'script', 'twitter-wjs');</script>
</body>
</html>