From fa737fccddf3ff0e858ea6d95703aab919a04dbd Mon Sep 17 00:00:00 2001 From: samunohito <46447427+samunohito@users.noreply.github.com> Date: Wed, 7 Feb 2024 19:52:00 +0900 Subject: [PATCH] block delete --- .../admin/custom-emojis-grid.local.list.vue | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/pages/admin/custom-emojis-grid.local.list.vue b/packages/frontend/src/pages/admin/custom-emojis-grid.local.list.vue index be3ca8759c..2ca27b7786 100644 --- a/packages/frontend/src/pages/admin/custom-emojis-grid.local.list.vue +++ b/packages/frontend/src/pages/admin/custom-emojis-grid.local.list.vue @@ -383,8 +383,24 @@ function onGridCellValueChange(event: GridCellValueChangeEvent, currentState: Gr } } -function onGridKeyDown(event: GridKeyDownEvent, currentState: GridCurrentState) { - optInGridUtils.defaultKeyDownHandler(gridItems, event, currentState); +async function onGridKeyDown(event: GridKeyDownEvent, currentState: GridCurrentState) { + const { ctrlKey, code } = event.event; + + switch (true) { + case ctrlKey: { + switch (code) { + case 'KeyC': { + optInGridUtils.copyToClipboard(gridItems, currentState); + break; + } + case 'KeyV': { + await optInGridUtils.pasteFromClipboard(gridItems, currentState); + break; + } + } + break; + } + } } async function refreshCustomEmojis() {