Add keyboard shortcut to duplicate layers (#214)

* Add keyboard shortcut to duplicate layers

* Avoid heap allocation in DuplicateSelectedLayers
This commit is contained in:
Till Arnold
2021-06-16 11:15:02 +02:00
committed by Keavon Chambers
parent 310db82ab4
commit ff232bd722
5 changed files with 20 additions and 1 deletions

View File

@@ -202,10 +202,12 @@ export default defineComponent({
on_mouse_move(e.offsetX, e.offsetY);
},
async keyDown(e: KeyboardEvent) {
e.preventDefault();
const { on_key_down } = await wasm;
on_key_down(e.key);
},
async keyUp(e: KeyboardEvent) {
e.preventDefault();
const { on_key_up } = await wasm;
on_key_up(e.key);
},