Browse Source

use Ctrl+<Num> instead of Ctrl+Alt+<Num> to insert title

Le Tan 8 years ago
parent
commit
bcdfc90951

+ 1 - 1
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+<Num>`  
+- `Ctrl+<Num>`  
 Insert title at level `<Num>`. `<Num>` 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.

+ 1 - 1
src/resources/docs/shortcuts_zh.md

@@ -51,7 +51,7 @@
 删除光标位置向后到第一个空白字符之间的所有字符。
 - `Ctrl+U`  
 删除光标位置到行首的所有字符。
-- `Ctrl+Alt+<Num>`  
+- `Ctrl+<Num>`  
 插入级别为`<Num>`的标题。`<Num>`应该是1到6的一个数字。如果已经选择文本,则将当前选择文本改为标题。
 - `Tab`/`Shift+Tab`  
 增加或减小缩进。如果已经选择文本,则对所有选择的行进行缩进操作。

+ 2 - 2
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 + <N>: insert title at level <N>.
+            if (modifiers == Qt::ControlModifier) {
+                // Ctrl + <N>: insert title at level <N>.
                 if (insertTitle(key - Qt::Key_0)) {
                     p_event->accept();
                     ret = true;