From 1ede7ed3e9ee72be055cd93b6ec57c3f247de08c Mon Sep 17 00:00:00 2001 From: armored-dragon Date: Mon, 30 Sep 2024 08:02:44 -0500 Subject: [PATCH] Replaced key value with key text. Added additional comment about the specific delete key used. --- scripts/system/create/edit.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/system/create/edit.js b/scripts/system/create/edit.js index c9f167e54b..624886e454 100644 --- a/scripts/system/create/edit.js +++ b/scripts/system/create/edit.js @@ -2133,19 +2133,19 @@ // Hacks to get the menu bar buttons to work // Copy - if (event.key === 67 && event.isControl && !event.isShifted) { + if (event.text.toLowerCase() === "c" && event.isControl && !event.isShifted) { selectionManager.copySelectedEntities(); } // Paste - if (event.key === 86 && event.isControl && !event.isShifted) { + if (event.text.toLowerCase() === "v" && event.isControl && !event.isShifted) { selectionManager.pasteEntities(); } // Cut - if (event.key === 88 && event.isControl && !event.isShifted) { + if (event.text.toLowerCase() === "x" && event.isControl && !event.isShifted) { selectionManager.cutSelectedEntities(); } - // Delete - if (event.key === 16777223 && !event.isControl && !event.isShifted) { + // Delete - This uses the physical 'delete' key on a keyboard. + if (event.text.toLowerCase() === "delete" && !event.isControl && !event.isShifted) { createApp.deleteSelectedEntities(); } };