From 8d6c6dc6d9f8c356cc2cabcdc244fdc7f75651f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=96=9B=E8=85=BE=E9=A3=9E?= Date: Wed, 6 Dec 2023 19:25:44 +0800 Subject: [PATCH] fix: format keyboard arrow codes to Mousetrap special codes (#4065) --- packages/x6-plugin-keyboard/src/keyboard.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/x6-plugin-keyboard/src/keyboard.ts b/packages/x6-plugin-keyboard/src/keyboard.ts index a970839e8cd..daec65a5201 100644 --- a/packages/x6-plugin-keyboard/src/keyboard.ts +++ b/packages/x6-plugin-keyboard/src/keyboard.ts @@ -106,6 +106,10 @@ export class KeyboardImpl extends Disposable implements IDisablable { .replace(/\s/g, '') .replace('delete', 'del') .replace('cmd', 'command') + .replace('arrowup', 'up') + .replace('arrowright', 'right') + .replace('arrowdown', 'down') + .replace('arrowleft', 'left') const formatFn = this.options.format if (formatFn) {