diff options
Diffstat (limited to 'src/virtualkeyboard/hunspellinputmethod.cpp')
-rw-r--r-- | src/virtualkeyboard/hunspellinputmethod.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/virtualkeyboard/hunspellinputmethod.cpp b/src/virtualkeyboard/hunspellinputmethod.cpp index 2669367f..7af2874e 100644 --- a/src/virtualkeyboard/hunspellinputmethod.cpp +++ b/src/virtualkeyboard/hunspellinputmethod.cpp @@ -208,7 +208,7 @@ bool HunspellInputMethod::keyEvent(Qt::Key key, const QString &text, Qt::Keyboar } break; default: - if (text.length() == 1) { + if (text.length() > 0) { QChar c = text.at(0); bool addToWord = !c.isPunct() && !c.isSymbol(); if (!addToWord) { @@ -225,13 +225,16 @@ bool HunspellInputMethod::keyEvent(Qt::Key key, const QString &text, Qt::Keyboar emit selectionListActiveItemChanged(DeclarativeSelectionListModel::WordCandidateList, d->activeWordIndex); } accept = true; + } else if (text.length() > 1) { + bool addSpace = !d->word.isEmpty(); + update(); + if (addSpace) + inputContext()->commit(" "); + inputContext()->commit(text); + accept = true; } else { update(); } - } else if (text.length() > 1) { - update(); - inputContext()->commit(text); - accept = true; } break; } |