(controllerkey)
| 3311 | } |
| 3312 | } |
| 3313 | keyLookup(controllerkey) { |
| 3314 | if (controllerkey === undefined) return 0; |
| 3315 | if (typeof controllerkey === "number") return controllerkey; |
| 3316 | controllerkey = controllerkey.toString().toLowerCase() |
| 3317 | const values = Object.values(this.keyMap); |
| 3318 | if (values.includes(controllerkey)) { |
| 3319 | const index = values.indexOf(controllerkey); |
| 3320 | return Object.keys(this.keyMap)[index]; |
| 3321 | } |
| 3322 | return -1; |
| 3323 | } |
| 3324 | keyChange(e) { |
| 3325 | if (e.repeat) return; |
| 3326 | if (!this.started) return; |