From 17a13eb0c0b83ae86125619da6f2ea2d560fa1c0 Mon Sep 17 00:00:00 2001 From: Arne van Iterson Date: Sun, 29 Mar 2020 18:39:23 +0200 Subject: [PATCH] Added some more keys to KeyControls.js --- lib/controls/KeyControls.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/controls/KeyControls.js b/lib/controls/KeyControls.js index d2469bb..1266cc5 100644 --- a/lib/controls/KeyControls.js +++ b/lib/controls/KeyControls.js @@ -19,6 +19,21 @@ class KeyControls { return this.keys[32]; } + get ctrl() { + // Control + return this.keys[17]; + } + + get shift() { + // Shift + return this.keys[16]; + } + + get escape() { + // Escape + return this.keys[27]; + } + get x() { // Arrow Left or A (WASD) if (this.keys[37] || this.keys[65]) {