Il sito funziona meglio con JavaScript.
Home
Esplora
Aiuto
Accedi
chemicalcrux
/
macrovision
Segui
1
Vota
0
Forka
0
Codice
Problemi
5
Pull Requests
0
Rilasci
10
Wiki
Attività
Sfoglia il codice sorgente
Make the delete and backspace keys remove the currently selected entity
tags/v0.0.3
Fen Dweller
6 anni fa
parent
1e83dcd6fa
commit
babcbdcd73
1 ha cambiato i file
con
9 aggiunte
e
0 eliminazioni
Visualizzazione separata
Diff Options
Show Stats
Download Patch File
Download Diff File
+9
-0
macrovision.js
+ 9
- 0
macrovision.js
Vedi File
@@ -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();
});
Write
Preview
Loading…
Annulla
Salva