-
-
Notifications
You must be signed in to change notification settings - Fork 33
/
index.html
122 lines (110 loc) · 4 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<html>
<head>
<title>Keyzz - Keyboard Events Playground</title>
<link rel="stylesheet" href="./style.css">
<link rel="apple-touch-icon" sizes="180x180" href="./favs/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="./favs/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="./favs/favicon-16x16.png">
<link rel="manifest" href="./favs/site.webmanifest">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" rel="stylesheet">
</head>
<body>
<div class="git-ribbon">
<a href="https://github.com/atapas/js-keycodes-demo" target="_blank"><img loading="lazy" width="149"
height="149"
src="https://github.blog/wp-content/uploads/2008/12/forkme_right_red_aa0000.png?resize=149%2C149"
class="attachment-full size-full" alt="Fork me on GitHub" data-recalc-dims="1"></a>
</div>
<div id="app" class="container">
<h1>👋 Keyzz - Keyboard Events Playground</h1>
<h2>It works <u>only</u> with the Physical Keyboard ⌨️</h2>
<div id="key">
<div class="filter">
Filter by:
<input type="checkbox" id="keydown-cb-id" name="keydown-cb" checked>
<label for="keydown-cb-id">Keydown</label>
<input type="checkbox" id="keypress-cb-id" name="keypress-cb" checked>
<label for="keypress-cb-id">Keypress</label>
<input type="checkbox" id="keyup-cb-id" name="keyup-cb" checked>
<label for="keyup-cb-id">Keyup</label>
</div>
<div class="hint">
Hint: The above filtering reflects from the next key type.
</div>
<div class="results">
<div class="clearAll">
<button id="clear-all-id">Clear All</button>
<button id="see-details-id">Show All Key Code</button>
<span id="dialog-warning" style="display: none">
The dialog API is not supported in this browser yet. <a href="#" id="download-csv-link">Click here to download</a> the details as CSV
</span>
</div>
<div class="note">
<h2>
Focus anywhere and use any Keys on your Physical Keyboard ⌨️
</h2>
</div>
<div class="note key" id="key-id"></div>
<table id="event-table">
<thead>
<tr class="legend">
<th></th>
<th colspan="3" class="legacy">Legacy/Obsolete</th>
<th colspan="2" class="current">Current</th>
<th colspan="5" class="modifier">Modifiers</th>
</tr>
<tr>
<th class="type">Event Type</th>
<th class="legacy">event.which</th>
<th class="legacy">event.keyCode</th>
<th class="legacy">event.charCode</th>
<th class="current">Key</th>
<th class="current">Code</th>
<th class="modifier">Shift Key?</th>
<th class="modifier">Alt Key?</th>
<th class="modifier">Control Key?</th>
<th class="modifier">Meta Key?</th>
<th class="modifier">Modifier State</th>
</tr>
</thead>
<tbody id="event-table-body">
</tbody>
</table>
</div>
</div>
</div>
</div>
<dialog id="keyCodeDialog" style="width: 95%;">
<div>
<h1>⌨️ Complete Key Code List</h1>
<h3>The table below lists all possible keys with code and other details.</h3>
<button id="export-to-csv">Export to CSV</button>
<div class="dialog-content">
<table id="key-code-table">
<thead>
<tr>
<th>Key Name</th>
<th>event.which</th>
<th>event.key</th>
<th>event.code</th>
<th>Notes</th>
</tr>
</thead>
<tbody id="key-code-table-body">
</tbody>
</table>
</div>
</div>
<menu style="float: right;">
<button id="keyCodeDlgClsId" onclick="closeDialig()" class="close" value="Close">Close</button>
</menu>
</dialog>
<div id="scroll-top-wrapper">
<div id="scroll-top-button">
<i class="fas fa-arrow-up"></i>
</div>
</div>
<script src="./scripts/index.js"></script>
</body>
</html>