feat: 添加括号符号

This commit is contained in:
2021-10-07 14:38:40 +08:00
parent 78469b531e
commit c0eb2d5d70
2 changed files with 8 additions and 0 deletions
+6
View File
@@ -130,6 +130,12 @@ const handleKeyPress = wrappedAction((ev) => {
case isNote(inputKey) && !ctrl && !shift: case isNote(inputKey) && !ctrl && !shift:
notation.note = inputKey; notation.note = inputKey;
break; break;
case inputKey === "(" && !ctrl:
notation.note = N.crackerOpen;
break;
case inputKey === ")" && !ctrl:
notation.note = N.crackerClose;
break;
case inputKey === "-" && !ctrl && !shift: case inputKey === "-" && !ctrl && !shift:
notation.note = N.extend; notation.note = N.extend;
break; break;
+2
View File
@@ -11,6 +11,8 @@ const notations = {
si: "7", si: "7",
extend: "─", extend: "─",
separator: "│", separator: "│",
crackerOpen: "",
crackerClose: ")"
}; };
const notes = [ const notes = [
notations.zero, notations.zero,