* Calls the relevant action for the current state of the key. * @memberof Key
()
| 40 | * @memberof Key |
| 41 | */ |
| 42 | action() { |
| 43 | if (1 === this.state) { |
| 44 | if (this.actions.down) { |
| 45 | this.actions.down(); |
| 46 | } |
| 47 | } else if (2 === this.state) { |
| 48 | if (this.actions.up) { |
| 49 | this.actions.up(); |
| 50 | } |
| 51 | this.updateState(0); |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | /** |
| 56 | * |