mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
Binded closeDialogue to esc
In that way the user can exit a dialogue without using the button and the mouse
This commit is contained in:
@ -75,13 +75,12 @@ const Input = (() => {
|
||||
}
|
||||
|
||||
//if no document has been created yet or there is a dialog box open ignore hotkeys
|
||||
if (!EditorState.documentCreated() || Dialogue.isOpen()) return;
|
||||
if (!EditorState.documentCreated()) return;
|
||||
|
||||
if (e.key === "Escape") {
|
||||
console.log("esc");
|
||||
Events.emit("esc-pressed");
|
||||
}
|
||||
else {
|
||||
else if (!Dialogue.isOpen()){
|
||||
switch (keyboardEvent.keyCode) {
|
||||
//pencil tool - 1, b
|
||||
case 49: case 66:
|
||||
|
Reference in New Issue
Block a user