From 4641d39dd8d664f7825f75a64216ccb97efb5c73 Mon Sep 17 00:00:00 2001 From: wind X <35559153+XueMeijing@users.noreply.github.com> Date: Tue, 9 Jan 2024 10:30:31 +0800 Subject: [PATCH] fix: format keyboard arrow codes to Mousetrap special codes (#4065) (#4080) --- 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) {