-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
48 lines (39 loc) · 864 Bytes
/
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>KeyboardEasy</title>
</head>
<body>
<style>
body{
text-align: center;
}
div{
width: 100%;
height: 100%;
}
h1{
margin-top: 150px;
}
</style>
<h1 id="myH1">Hello my Friends</h1>
<script src="dist/keyboard.min.js"></script>
<script>
function hadlingH1(keys){
var h1 = document.getElementById('myH1');
h1.innerHTML = keys;
}
KeyboardEasy.setConfigurations({
showNameKeyPressed : false,
ignoreCase: false,
keepOrderPressed: false
})
KeyboardEasy.watchKeys(['a', 'b'], function (evt, keys) {
console.log('Last event:', evt)
console.log('Keys Pressed:', keys)
hadlingH1(keys.concat(" pressed!!"));
});
</script>
</body>
</html>