Ver código fonte

Make the delete and backspace keys remove the currently selected entity

tags/v0.0.3
Fen Dweller 6 anos atrás
pai
commit
babcbdcd73
1 arquivos alterados com 9 adições e 0 exclusões
  1. +9
    -0
      macrovision.js

+ 9
- 0
macrovision.js Ver arquivo

@@ -653,6 +653,15 @@ document.addEventListener("DOMContentLoaded", () => {
}
});

document.addEventListener("keydown", e => {
console.log(e)
if (e.key == "Delete" || e.key == "Backspace") {
if (selected) {
removeEntity(selected);
selected = null;
}
}
})
prepareEntities();
});



Carregando…
Cancelar
Salvar