-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathKeyboard.svelte
59 lines (56 loc) · 1.46 KB
/
Keyboard.svelte
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
<script>
import Key from './Key.svelte';
export let states;
</script>
<div class="keyboard">
<div class="keyboard-row">
<Key key=q state={states.q} />
<Key key=w state={states.w} />
<Key key=e state={states.e} />
<Key key=r state={states.r} />
<Key key=t state={states.t} />
<Key key=y state={states.y} />
<Key key=u state={states.u} />
<Key key=i state={states.i} />
<Key key=o state={states.o} />
<Key key=p state={states.p} />
</div>
<div class="keyboard-row">
<Key key=a state={states.a} />
<Key key=s state={states.s} />
<Key key=d state={states.d} />
<Key key=f state={states.f} />
<Key key=g state={states.g} />
<Key key=h state={states.h} />
<Key key=j state={states.j} />
<Key key=k state={states.k} />
<Key key=l state={states.l} />
</div>
<div class="keyboard-row">
<Key key=Enter name=enter control=true />
<Key key=z state={states.z} />
<Key key=x state={states.x} />
<Key key=c state={states.c} />
<Key key=v state={states.v} />
<Key key=b state={states.b} />
<Key key=n state={states.n} />
<Key key=m state={states.m} />
<Key key=Backspace name=⌫ control=true />
</div>
</div>
<style>
.keyboard {
margin-left: auto;
margin-right: auto;
user-select: none;
bottom:0;
padding-top: 25px;
width:90%;
}
.keyboard-row {
display: flex;
width: 100%;
margin: 0 auto 8px;
touch-action: manipulation;
}
</style>