diff --git a/src/menu/editor.js b/src/menu/editor.js index 13bb9d6..3ab100a 100644 --- a/src/menu/editor.js +++ b/src/menu/editor.js @@ -15,6 +15,7 @@ import { createNotation, isNote, notations as N, + placeTie, } from "../util/notation"; import { cloneParagraph, @@ -179,6 +180,32 @@ const handleKeyPress = wrappedAction((ev) => { } break; } + case inputKey === "a" && !ctrl && !shift: { + if (!state.tieSourceKey) { + state.tieSourceKey = notation.key; + } else if (state.tieSourceKey === notation.key) { + state.tieSourceKey = null; + } else { + placeTie(notation); + } + break; + } + case inputKey === "a" && !ctrl && shift: { + if (notation.tieTo) { + const { notation: tieDesc } = findParagraphAndNotation( + notation.tieTo + ); + if (tieDesc) { + tieDesc.tieTo = null; + } + notation.tieTo = null; + break; + } + } + case inputKey === "!" && !ctrl: { + notation.breakUnderline = !notation.breakUnderline; + break; + } case inputKey === "~" && !ctrl: { if (notation.topDecorators.includes("~")) { notation.topDecorators.splice(notation.topDecorators.indexOf("~"), 1); diff --git a/src/view/HelpModal/index.js b/src/view/HelpModal/index.js index 5490cd2..9430d9a 100644 --- a/src/view/HelpModal/index.js +++ b/src/view/HelpModal/index.js @@ -44,14 +44,17 @@ function HelpModal({ visible, onVisibleChange }) { 直接按键盘上相应的键即可输入到当前符号。支持的音符符号有:
0~7 - ( ) + ─ ( )