mirror of
https://github.com/tobspr/shapez.io.git
synced 2026-03-02 03:39:21 +00:00
Change keybinding for multi select to ctrl
This commit is contained in:
@@ -25,6 +25,7 @@ export class InputDistributor {
|
||||
|
||||
this.shiftIsDown = false;
|
||||
this.altIsDown = false;
|
||||
this.ctrlIsDown = false;
|
||||
|
||||
this.bindToEvents();
|
||||
}
|
||||
@@ -175,6 +176,7 @@ export class InputDistributor {
|
||||
* Handles when the page got blurred
|
||||
*/
|
||||
handleBlur() {
|
||||
this.ctrlIsDown = false;
|
||||
this.shiftIsDown = false;
|
||||
this.altIsDown = false;
|
||||
this.forwardToReceiver("pageBlur", {});
|
||||
@@ -188,6 +190,9 @@ export class InputDistributor {
|
||||
if (event.keyCode === 16) {
|
||||
this.shiftIsDown = true;
|
||||
}
|
||||
if (event.keyCode === 17) {
|
||||
this.ctrlIsDown = true;
|
||||
}
|
||||
if (event.keyCode === 18) {
|
||||
this.altIsDown = true;
|
||||
}
|
||||
@@ -229,6 +234,10 @@ export class InputDistributor {
|
||||
this.shiftIsDown = false;
|
||||
this.forwardToReceiver("shiftUp", {});
|
||||
}
|
||||
if (event.keyCode === 17) {
|
||||
this.ctrlIsDown = false;
|
||||
this.forwardToReceiver("ctrlUp", {});
|
||||
}
|
||||
if (event.keyCode === 18) {
|
||||
this.altIsDown = false;
|
||||
this.forwardToReceiver("altUp", {});
|
||||
|
||||
@@ -11,6 +11,7 @@ export class InputReceiver {
|
||||
this.pageBlur = new Signal();
|
||||
this.shiftUp = new Signal();
|
||||
this.altUp = new Signal();
|
||||
this.ctrlUp = new Signal();
|
||||
|
||||
// Dispatched on destroy
|
||||
this.destroyed = new Signal();
|
||||
|
||||
Reference in New Issue
Block a user