From c0eb2d5d70deb8e0bc4926fe160c03dc063b17fb Mon Sep 17 00:00:00 2001 From: mattuy Date: Thu, 7 Oct 2021 14:38:40 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=8B=AC=E5=8F=B7?= =?UTF-8?q?=E7=AC=A6=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/menu/editor.js | 6 ++++++ src/util/notation.js | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/menu/editor.js b/src/menu/editor.js index 6daaa51..13bb9d6 100644 --- a/src/menu/editor.js +++ b/src/menu/editor.js @@ -130,6 +130,12 @@ const handleKeyPress = wrappedAction((ev) => { case isNote(inputKey) && !ctrl && !shift: notation.note = inputKey; break; + case inputKey === "(" && !ctrl: + notation.note = N.crackerOpen; + break; + case inputKey === ")" && !ctrl: + notation.note = N.crackerClose; + break; case inputKey === "-" && !ctrl && !shift: notation.note = N.extend; break; diff --git a/src/util/notation.js b/src/util/notation.js index 50cc285..e5a889e 100644 --- a/src/util/notation.js +++ b/src/util/notation.js @@ -11,6 +11,8 @@ const notations = { si: "7", extend: "─", separator: "│", + crackerOpen: "(", + crackerClose: ")" }; const notes = [ notations.zero,