forked from Wilson-Pedro/keyboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
230 lines (174 loc) · 2.85 KB
/
script.js
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
var res = document.querySelector('#res')
function zero() {
res.textContent += '0'
}
function one() {
res.textContent += `1`
}
function two() {
res.textContent += `2`
}
function three() {
res.textContent += '3'
}
function four() {
res.textContent += '4'
}
function five() {
res.textContent += '5'
}
function six() {
res.textContent += '6'
}
function seven() {
res.textContent += '7'
}
function eight() {
res.textContent += '8'
}
function nine(){
res.textContent += '9'
}
function Q() {
res.textContent += 'q'
}
function W() {
res.textContent += 'w'
}
function E() {
res.textContent += 'e'
}
function R() {
res.textContent += 'r'
}
function T() {
res.textContent += 't'
}
function Y() {
res.textContent += 'y'
}
function U() {
res.textContent += 'u'
}
function I() {
res.textContent += 'i'
}
function O() {
res.textContent += 'o'
}
function P() {
res.textContent += 'p'
}
function A() {
res.textContent += 'a'
}
function S() {
res.textContent += 's'
}
function D() {
res.textContent += 'd'
}
function F() {
res.textContent += 'f'
}
function G() {
res.textContent += 'f'
}
function H() {
res.textContent += 'h'
}
function J() {
res.textContent += 'j'
}
function K() {
res.textContent += 'k'
}
function L() {
res.textContent += 'l'
}
function Ç() {
res.textContent += 'ç'
}
function Z() {
res.textContent += 'z'
}
function X() {
res.textContent += 'x'
}
function C() {
res.textContent += 'c'
}
function V() {
res.textContent += 'v'
}
function B() {
res.textContent += 'b'
}
function N() {
res.textContent += 'n'
}
function M() {
res.textContent += 'm'
}
function acento() {
res.textContent += '´'
}
function abrirChave() {
res.textContent += '{'
}
function fecharChave() {
res.textContent += '}'
}
function abrirColchete() {
res.textContent += '['
}
function fecharColchete() {
res.textContent += ']'
}
function underline() {
res.textContent += '_'
}
function menos() {
res.textContent += '-'
}
function mais() {
res.textContent += '+'
}
function igual() {
res.textContent += '='
}
function interrogação() {
res.textContent += '?'
}
function barra() {
res.textContent += '|'
}
function barraR() {
res.textContent += '/'
}
function tio() {
res.textContent += '^'
}
function doisPontos() {
res.textContent += ':'
}
function maior() {
res.textContent += '<'
}
function menor() {
res.textContent += '>'
}
function aspas() {
res.textContent += '"'
}
function espaço() {
res.textContent += ' '
}
function backspace() {
var res = document.getElementById('res').innerHTML
document.getElementById('res').innerHTML = res.substring(0, res.length - 1)
}
function enter(){
var res = document.getElementById('res').innerHTML
alert(res)
}