This website works better with JavaScript.
Home
Explore
Help
Sign In
chemicalcrux
/
macrovision
Watch
1
Star
0
Fork
0
Code
Issues
5
Pull Requests
0
Releases
10
Wiki
Activity
Browse Source
Make the delete and backspace keys remove the currently selected entity
tags/v0.0.3
Fen Dweller
6 years ago
parent
1e83dcd6fa
commit
babcbdcd73
1 changed files
with
9 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+9
-0
macrovision.js
+ 9
- 0
macrovision.js
View 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…
Cancel
Save