diff --git a/src/resources/docs/shortcuts_en.md b/src/resources/docs/shortcuts_en.md index 9e167f42..3ab518b8 100644 --- a/src/resources/docs/shortcuts_en.md +++ b/src/resources/docs/shortcuts_en.md @@ -51,7 +51,7 @@ Backspace. Delete a character backward. Delete all the characters from current cursor to the first space backward. - `Ctrl+U` Delete all the characters from current cursor to the beginning of current line. -- `Ctrl+Alt+` +- `Ctrl+` Insert title at level ``. `` should be 1 to 6. Currently selected text will be changed to title if exist. - `Tab`/`Shift+Tab` Increase or decrease the indentation. If any text is selected, the indentation will operate on all these selected lines. diff --git a/src/resources/docs/shortcuts_zh.md b/src/resources/docs/shortcuts_zh.md index 51af3a31..fba27c4e 100644 --- a/src/resources/docs/shortcuts_zh.md +++ b/src/resources/docs/shortcuts_zh.md @@ -51,7 +51,7 @@ 删除光标位置向后到第一个空白字符之间的所有字符。 - `Ctrl+U` 删除光标位置到行首的所有字符。 -- `Ctrl+Alt+` +- `Ctrl+` 插入级别为``的标题。``应该是1到6的一个数字。如果已经选择文本,则将当前选择文本改为标题。 - `Tab`/`Shift+Tab` 增加或减小缩进。如果已经选择文本,则对所有选择的行进行缩进操作。 diff --git a/src/vmdeditoperations.cpp b/src/vmdeditoperations.cpp index 4259bdb3..96dabb05 100644 --- a/src/vmdeditoperations.cpp +++ b/src/vmdeditoperations.cpp @@ -194,8 +194,8 @@ bool VMdEditOperations::handleKeyPressEvent(QKeyEvent *p_event) case Qt::Key_5: case Qt::Key_6: { - if (modifiers == (Qt::ControlModifier | Qt::AltModifier)) { - // Ctrl + Alt + : insert title at level . + if (modifiers == Qt::ControlModifier) { + // Ctrl + : insert title at level . if (insertTitle(key - Qt::Key_0)) { p_event->accept(); ret = true;