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

This commit is contained in:
Le Tan 2017-04-20 21:34:04 +08:00
parent bd7f0e6cdd
commit bcdfc90951
3 changed files with 4 additions and 4 deletions

View File

@ -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.

View File

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

View File

@ -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;