diff options
author | Jarkko Koivikko <jarkko.koivikko@code-q.fi> | 2017-08-02 11:13:04 +0300 |
---|---|---|
committer | Jarkko Koivikko <jarkko.koivikko@code-q.fi> | 2017-08-07 07:00:41 +0000 |
commit | 6045966ba0421319ad40994bee819e300c291c03 (patch) | |
tree | c18de1c70e6b4e55496b0b7f508bde92dfadc96c /src | |
parent | 9d10dd02c2d8686141ff2dbe511f29d2d514fba2 (diff) |
Add Bulgarian keyboard layout
[ChangeLog] Added Bulgarian keyboard layout.
Change-Id: I636ba97d3fe80c94f91b269426465023a433d7bf
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/config.pri | 1 | ||||
-rw-r--r-- | src/virtualkeyboard/content/components/InputModeKey.qml | 1 | ||||
-rw-r--r-- | src/virtualkeyboard/content/layouts/bg_BG/handwriting.qml | 99 | ||||
-rw-r--r-- | src/virtualkeyboard/content/layouts/bg_BG/main.qml | 370 | ||||
-rw-r--r-- | src/virtualkeyboard/content/layouts/bg_BG/symbols.qml | 376 | ||||
-rw-r--r-- | src/virtualkeyboard/content/styles/default/style.qml | 2 | ||||
-rw-r--r-- | src/virtualkeyboard/content/styles/retro/style.qml | 2 | ||||
-rw-r--r-- | src/virtualkeyboard/doc/src/qtvirtualkeyboard-index.qdoc | 1 | ||||
-rw-r--r-- | src/virtualkeyboard/hunspellinputmethod.cpp | 3 | ||||
-rw-r--r-- | src/virtualkeyboard/inputengine.cpp | 3 | ||||
-rw-r--r-- | src/virtualkeyboard/inputengine.h | 1 | ||||
-rw-r--r-- | src/virtualkeyboard/plaininputmethod.cpp | 3 | ||||
-rw-r--r-- | src/virtualkeyboard/t9writeinputmethod.cpp | 12 | ||||
-rw-r--r-- | src/virtualkeyboard/virtualkeyboard.pro | 7 |
14 files changed, 881 insertions, 0 deletions
diff --git a/src/config.pri b/src/config.pri index 92df979a..2752723f 100644 --- a/src/config.pri +++ b/src/config.pri @@ -32,6 +32,7 @@ disable-layouts { # Flag for activating all languages lang-all: CONFIG += \ lang-ar_AR \ + lang-bg_BG \ lang-da_DK \ lang-de_DE \ lang-el_GR \ diff --git a/src/virtualkeyboard/content/components/InputModeKey.qml b/src/virtualkeyboard/content/components/InputModeKey.qml index 382a864b..1fd55ff1 100644 --- a/src/virtualkeyboard/content/components/InputModeKey.qml +++ b/src/virtualkeyboard/content/components/InputModeKey.qml @@ -69,6 +69,7 @@ Key { "カ", // InputEngine.Katakana "全角", // InputEngine.FullwidthLatin "ΑΒΓ", // InputEngine.Greek + "АВЗ", // InputEngine.Cyrillic "中文", // InputEngine.ChineseHandwriting "日本語", // InputEngine.JapaneseHandwriting "한국어", // InputEngine.KoreanHandwriting diff --git a/src/virtualkeyboard/content/layouts/bg_BG/handwriting.qml b/src/virtualkeyboard/content/layouts/bg_BG/handwriting.qml new file mode 100644 index 00000000..782f3217 --- /dev/null +++ b/src/virtualkeyboard/content/layouts/bg_BG/handwriting.qml @@ -0,0 +1,99 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 or (at your option) any later version +** approved by the KDE Free Qt Foundation. The licenses are as published by +** the Free Software Foundation and appearing in the file LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Layouts 1.0 +import QtQuick.VirtualKeyboard 2.3 + +KeyboardLayout { + function createInputMethod() { + return Qt.createQmlObject('import QtQuick 2.0; import QtQuick.VirtualKeyboard 2.3; HandwritingInputMethod {}', parent) + } + sharedLayouts: ['symbols'] + + KeyboardRow { + Layout.preferredHeight: 3 + KeyboardColumn { + Layout.preferredWidth: bottomRow.width - hideKeyboardKey.width + KeyboardRow { + TraceInputKey { + objectName: "hwrInputArea" + patternRecognitionMode: InputEngine.HandwritingRecoginition + horizontalRulers: + InputContext.inputEngine.inputMode !== InputEngine.Cyrillic ? [] : + [Math.round(boundingBox.height / 4), Math.round(boundingBox.height / 4) * 2, Math.round(boundingBox.height / 4) * 3] + } + } + } + KeyboardColumn { + Layout.preferredWidth: hideKeyboardKey.width + KeyboardRow { + BackspaceKey {} + } + KeyboardRow { + EnterKey {} + } + KeyboardRow { + ShiftKey { } + } + } + } + KeyboardRow { + id: bottomRow + Layout.preferredHeight: 1 + keyWeight: 154 + InputModeKey { + weight: 217 + } + ChangeLanguageKey { + weight: 154 + customLayoutsOnly: true + } + HandwritingModeKey { + weight: 154 + } + SpaceKey { + weight: 864 + } + Key { + key: Qt.Key_Apostrophe + text: "'" + alternativeKeys: "<>()#%&*/\\\"'=+-_" + } + Key { + key: Qt.Key_Period + text: "." + alternativeKeys: "!,.;:?" + } + HideKeyboardKey { + id: hideKeyboardKey + weight: 204 + } + } +} diff --git a/src/virtualkeyboard/content/layouts/bg_BG/main.qml b/src/virtualkeyboard/content/layouts/bg_BG/main.qml new file mode 100644 index 00000000..f9dad187 --- /dev/null +++ b/src/virtualkeyboard/content/layouts/bg_BG/main.qml @@ -0,0 +1,370 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 or (at your option) any later version +** approved by the KDE Free Qt Foundation. The licenses are as published by +** the Free Software Foundation and appearing in the file LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.VirtualKeyboard 2.3 + +KeyboardLayoutLoader { + sharedLayouts: ['symbols'] + sourceComponent: InputContext.inputEngine.inputMode === InputEngine.Cyrillic ? cyrillicLayout : latinLayout + Component { + id: cyrillicLayout + KeyboardLayout { + keyWeight: 160 + KeyboardRow { + Key { + text: "я" + } + Key { + text: "в" + } + Key { + text: "е" + } + Key { + text: "р" + } + Key { + text: "т" + } + Key { + text: "ъ" + } + Key { + text: "у" + } + Key { + text: "и" + } + Key { + text: "о" + } + Key { + text: "п" + } + Key { + text: "ч" + } + BackspaceKey {} + } + KeyboardRow { + FillerKey { + weight: 56 + } + Key { + text: "а" + } + Key { + text: "с" + } + Key { + text: "д" + } + Key { + text: "ф" + } + Key { + text: "г" + } + Key { + text: "х" + } + Key { + text: "й" + } + Key { + text: "к" + } + Key { + text: "л" + } + Key { + text: "ш" + } + Key { + text: "щ" + } + EnterKey { + weight: 283 + } + } + KeyboardRow { + keyWeight: 156 + InputModeKey { + inputModes: [InputEngine.Cyrillic, InputEngine.Latin] + } + Key { + text: "з" + } + Key { + text: "ь" + } + Key { + text: "ц" + } + Key { + text: "ж" + } + Key { + text: "б" + } + Key { + text: "н" + } + Key { + text: "м" + } + Key { + text: "ю" + } + Key { + key: Qt.Key_Comma + text: "," + } + Key { + key: Qt.Key_Period + text: "." + alternativeKeys: "!.;?" + } + ShiftKey { + weight: 204 + } + } + KeyboardRow { + keyWeight: 154 + SymbolModeKey { + weight: 217 + } + ChangeLanguageKey { + weight: 154 + } + HandwritingModeKey { + weight: 154 + } + SpaceKey { + weight: 864 + } + Key { + key: Qt.Key_Apostrophe + text: "'" + } + Key { + key: 0xE000 + text: ":-)" + alternativeKeys: [ ";-)", ":-)", ":-D", ":-(", "<3" ] + } + HideKeyboardKey { + weight: 204 + } + } + } + } + Component { + id: latinLayout + KeyboardLayout { + keyWeight: 160 + KeyboardRow { + Key { + key: Qt.Key_Q + text: "q" + } + Key { + key: Qt.Key_W + text: "w" + } + Key { + key: Qt.Key_E + text: "e" + alternativeKeys: "êeëèé" + } + Key { + key: Qt.Key_R + text: "r" + alternativeKeys: "ŕrř" + } + Key { + key: Qt.Key_T + text: "t" + alternativeKeys: "ţtŧť" + } + Key { + key: Qt.Key_Y + text: "y" + alternativeKeys: "ÿyýŷ" + } + Key { + key: Qt.Key_U + text: "u" + alternativeKeys: "űūũûüuùú" + } + Key { + key: Qt.Key_I + text: "i" + alternativeKeys: "îïīĩiìí" + } + Key { + key: Qt.Key_O + text: "o" + alternativeKeys: "œøõôöòóo" + } + Key { + key: Qt.Key_P + text: "p" + } + BackspaceKey {} + } + KeyboardRow { + FillerKey { + weight: 56 + } + Key { + key: Qt.Key_A + text: "a" + alternativeKeys: (InputContext.inputMethodHints & (Qt.ImhEmailCharactersOnly | Qt.ImhUrlCharactersOnly)) ? "a@äåãâàá" : "aäåãâàá" + smallTextVisible: (InputContext.inputMethodHints & (Qt.ImhEmailCharactersOnly | Qt.ImhUrlCharactersOnly)) + } + Key { + key: Qt.Key_S + text: "s" + alternativeKeys: "šsşś" + } + Key { + key: Qt.Key_D + text: "d" + alternativeKeys: "dđď" + } + Key { + key: Qt.Key_F + text: "f" + } + Key { + key: Qt.Key_G + text: "g" + alternativeKeys: "ġgģĝğ" + } + Key { + key: Qt.Key_H + text: "h" + } + Key { + key: Qt.Key_J + text: "j" + } + Key { + key: Qt.Key_K + text: "k" + } + Key { + key: Qt.Key_L + text: "l" + alternativeKeys: "ĺŀłļľl" + } + EnterKey { + weight: 283 + } + } + KeyboardRow { + keyWeight: 156 + InputModeKey { + enabled: !(InputContext.inputMethodHints & Qt.ImhLatinOnly) && inputModeCount > 1 + inputModes: [InputEngine.Cyrillic, InputEngine.Latin] + } + Key { + key: Qt.Key_Z + text: "z" + alternativeKeys: "zžż" + } + Key { + key: Qt.Key_X + text: "x" + } + Key { + key: Qt.Key_C + text: "c" + alternativeKeys: "çcċčć" + } + Key { + key: Qt.Key_V + text: "v" + } + Key { + key: Qt.Key_B + text: "b" + } + Key { + key: Qt.Key_N + text: "n" + alternativeKeys: "ņńnň" + } + Key { + key: Qt.Key_M + text: "m" + } + Key { + key: Qt.Key_Comma + text: "," + } + Key { + key: Qt.Key_Period + text: "." + } + ShiftKey { + weight: 204 + } + } + KeyboardRow { + keyWeight: 154 + SymbolModeKey { + weight: 217 + } + ChangeLanguageKey { + weight: 154 + } + HandwritingModeKey { + weight: 154 + } + SpaceKey { + weight: 864 + } + Key { + key: Qt.Key_Apostrophe + text: "'" + } + Key { + key: 0xE000 + text: ":-)" + alternativeKeys: [ ";-)", ":-)", ":-D", ":-(", "<3" ] + } + HideKeyboardKey { + weight: 204 + } + } + } + } +} diff --git a/src/virtualkeyboard/content/layouts/bg_BG/symbols.qml b/src/virtualkeyboard/content/layouts/bg_BG/symbols.qml new file mode 100644 index 00000000..f6bcbdf6 --- /dev/null +++ b/src/virtualkeyboard/content/layouts/bg_BG/symbols.qml @@ -0,0 +1,376 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 or (at your option) any later version +** approved by the KDE Free Qt Foundation. The licenses are as published by +** the Free Software Foundation and appearing in the file LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Layouts 1.0 +import QtQuick.VirtualKeyboard 2.3 + +KeyboardLayoutLoader { + property bool secondPage + onVisibleChanged: if (!visible) secondPage = false + sourceComponent: secondPage ? page2 : page1 + Component { + id: page1 + KeyboardLayout { + keyWeight: 160 + KeyboardRow { + Key { + key: Qt.Key_1 + text: "1" + } + Key { + key: Qt.Key_2 + text: "2" + } + Key { + key: Qt.Key_3 + text: "3" + } + Key { + key: Qt.Key_4 + text: "4" + } + Key { + key: Qt.Key_5 + text: "5" + } + Key { + key: Qt.Key_6 + text: "6" + } + Key { + key: Qt.Key_7 + text: "7" + } + Key { + key: Qt.Key_8 + text: "8" + } + Key { + key: Qt.Key_9 + text: "9" + } + Key { + key: Qt.Key_0 + text: "0" + } + BackspaceKey {} + } + KeyboardRow { + FillerKey { + weight: 56 + } + Key { + key: Qt.Key_At + text: "@" + } + Key { + key: Qt.Key_NumberSign + text: "#" + } + Key { + key: Qt.Key_Percent + text: "%" + } + Key { + key: Qt.Key_Ampersand + text: "&" + } + Key { + key: Qt.Key_Asterisk + text: "*" + } + Key { + key: Qt.Key_Minus + text: "-" + } + Key { + key: Qt.Key_Plus + text: "+" + } + Key { + key: Qt.Key_ParenLeft + text: "(" + } + Key { + key: Qt.Key_ParenRight + text: ")" + } + EnterKey { + weight: 283 + } + } + KeyboardRow { + keyWeight: 156 + Key { + displayText: "1/2" + functionKey: true + onClicked: secondPage = !secondPage + } + Key { + key: Qt.Key_Exclam + text: "!" + } + Key { + key: Qt.Key_QuoteDbl + text: '"' + } + Key { + key: Qt.Key_Less + text: "<" + } + Key { + key: Qt.Key_Greater + text: ">" + } + Key { + key: Qt.Key_Apostrophe + text: "'" + } + Key { + key: Qt.Key_Colon + text: ":" + } + Key { + key: Qt.Key_Semicolon + text: ";" + } + Key { + key: Qt.Key_Slash + text: "/" + } + Key { + key: Qt.Key_Question + text: "?" + } + Key { + weight: 204 + displayText: "1/2" + functionKey: true + onClicked: secondPage = !secondPage + } + } + KeyboardRow { + keyWeight: 154 + SymbolModeKey { + weight: 217 + displayText: InputContext.inputEngine.inputMode === InputEngine.Cyrillic ? "АВЗ" : "ABC" + } + ChangeLanguageKey { + weight: 154 + } + SpaceKey { + weight: 864 + } + Key { + key: Qt.Key_Period + text: "." + alternativeKeys: ".," + } + Key { + key: 0xE000 + text: ":-)" + alternativeKeys: [ ";-)", ":-)", ":-D", ":-(", "<3" ] + } + HideKeyboardKey { + weight: 204 + } + } + } + } + Component { + id: page2 + KeyboardLayout { + keyWeight: 160 + KeyboardRow { + Key { + key: Qt.Key_AsciiTilde + text: "~" + } + Key { + key: Qt.Key_Agrave + text: "`" + } + Key { + key: Qt.Key_Bar + text: "|" + } + Key { + key: 0x7B + text: "·" + } + Key { + key: 0x221A + text: "√" + } + Key { + key: Qt.Key_division + text: "÷" + } + Key { + key: Qt.Key_multiply + text: "×" + } + Key { + key: Qt.Key_onehalf + text: "½" + alternativeKeys: "¼⅓½¾⅞" + } + Key { + key: Qt.Key_BraceLeft + text: "{" + } + Key { + key: Qt.Key_BraceRight + text: "}" + } + BackspaceKey {} + } + KeyboardRow { + FillerKey { + weight: 56 + } + Key { + key: Qt.Key_Dollar + text: "$" + } + Key { + key: 0x20AC + text: "€" + } + Key { + key: 0xC2 + text: "£" + } + Key { + key: 0xA2 + text: "¢" + } + Key { + key: 0xA5 + text: "¥" + } + Key { + key: Qt.Key_Equal + text: "=" + } + Key { + key: Qt.Key_section + text: "§" + } + Key { + key: Qt.Key_BracketLeft + text: "[" + } + Key { + key: Qt.Key_BracketRight + text: "]" + } + EnterKey { + weight: 283 + } + } + KeyboardRow { + keyWeight: 156 + Key { + displayText: "2/2" + functionKey: true + onClicked: secondPage = !secondPage + } + Key { + key: Qt.Key_Underscore + text: "_" + } + Key { + key: 0x2122 + text: '™' + } + Key { + key: 0x00AE + text: '®' + } + Key { + key: Qt.Key_guillemotleft + text: '«' + } + Key { + key: Qt.Key_guillemotright + text: '»' + } + Key { + key: 0x201C + text: '“' + } + Key { + key: 0x201D + text: '”' + } + Key { + key: Qt.Key_Backslash + text: "\\" + } + Key { + key: Qt.Key_AsciiCircum + text: "^" + } + Key { + weight: 204 + displayText: "2/2" + functionKey: true + onClicked: secondPage = !secondPage + } + } + KeyboardRow { + keyWeight: 154 + SymbolModeKey { + weight: 217 + displayText: InputContext.inputEngine.inputMode === InputEngine.Cyrillic ? "АВЗ" : "ABC" + } + ChangeLanguageKey { + weight: 154 + } + SpaceKey { + weight: 864 + } + Key { + key: 0x2026 + text: "\u2026" + } + Key { + key: 0xE000 + text: ":-)" + alternativeKeys: [ ";-)", ":-)", ":-D", ":-(", "<3" ] + } + HideKeyboardKey { + weight: 204 + } + } + } + } +} diff --git a/src/virtualkeyboard/content/styles/default/style.qml b/src/virtualkeyboard/content/styles/default/style.qml index 3056f541..e308959c 100644 --- a/src/virtualkeyboard/content/styles/default/style.qml +++ b/src/virtualkeyboard/content/styles/default/style.qml @@ -764,6 +764,8 @@ KeyboardStyle { return "123" case InputEngine.Greek: return "ΑΒΓ" + case InputEngine.Cyrillic: + return "АВЗ" case InputEngine.ChineseHandwriting: return "中文" case InputEngine.JapaneseHandwriting: diff --git a/src/virtualkeyboard/content/styles/retro/style.qml b/src/virtualkeyboard/content/styles/retro/style.qml index 49f99f32..b003badc 100644 --- a/src/virtualkeyboard/content/styles/retro/style.qml +++ b/src/virtualkeyboard/content/styles/retro/style.qml @@ -878,6 +878,8 @@ KeyboardStyle { return "123" case InputEngine.Greek: return "ΑΒΓ" + case InputEngine.Cyrillic: + return "АВЗ" case InputEngine.ChineseHandwriting: return "中文" case InputEngine.JapaneseHandwriting: diff --git a/src/virtualkeyboard/doc/src/qtvirtualkeyboard-index.qdoc b/src/virtualkeyboard/doc/src/qtvirtualkeyboard-index.qdoc index 234cdee2..bd18594c 100644 --- a/src/virtualkeyboard/doc/src/qtvirtualkeyboard-index.qdoc +++ b/src/virtualkeyboard/doc/src/qtvirtualkeyboard-index.qdoc @@ -66,6 +66,7 @@ \list \li Arabic + \li Bulgarian \li Danish \li Dutch \li English diff --git a/src/virtualkeyboard/hunspellinputmethod.cpp b/src/virtualkeyboard/hunspellinputmethod.cpp index 61d6dad5..20c345bb 100644 --- a/src/virtualkeyboard/hunspellinputmethod.cpp +++ b/src/virtualkeyboard/hunspellinputmethod.cpp @@ -58,6 +58,9 @@ QList<InputEngine::InputMode> HunspellInputMethod::inputModes(const QString &loc case QLocale::GreekScript: result.append(InputEngine::Greek); break; + case QLocale::CyrillicScript: + result.append(InputEngine::Cyrillic); + break; default: break; } diff --git a/src/virtualkeyboard/inputengine.cpp b/src/virtualkeyboard/inputengine.cpp index f838b362..070834a4 100644 --- a/src/virtualkeyboard/inputengine.cpp +++ b/src/virtualkeyboard/inputengine.cpp @@ -765,6 +765,7 @@ void InputEngine::timerEvent(QTimerEvent *timerEvent) \li \c InputEngine.Katakana Katakana input mode for Japanese. \li \c InputEngine.FullwidthLatin Fullwidth latin input mode for East Asian languages. \li \c InputEngine.Greek Greek input mode. + \li \c InputEngine.Cyrillic Cyrillic input mode. \li \c InputEngine.ChineseHandwriting Chinese handwriting. \li \c InputEngine.JapaneseHandwriting Japanese handwriting. \li \c InputEngine.KoreanHandwriting Korean handwriting. @@ -837,6 +838,8 @@ void InputEngine::timerEvent(QTimerEvent *timerEvent) Fullwidth latin input mode for East Asian languages. \value Greek Greek input mode. + \value Cyrillic + Cyrillic input mode. */ /*! diff --git a/src/virtualkeyboard/inputengine.h b/src/virtualkeyboard/inputengine.h index 54723522..53251688 100644 --- a/src/virtualkeyboard/inputengine.h +++ b/src/virtualkeyboard/inputengine.h @@ -75,6 +75,7 @@ public: Katakana, FullwidthLatin, Greek, + Cyrillic, ChineseHandwriting, JapaneseHandwriting, KoreanHandwriting diff --git a/src/virtualkeyboard/plaininputmethod.cpp b/src/virtualkeyboard/plaininputmethod.cpp index 3495ff38..8d77ac4e 100644 --- a/src/virtualkeyboard/plaininputmethod.cpp +++ b/src/virtualkeyboard/plaininputmethod.cpp @@ -54,6 +54,9 @@ QList<InputEngine::InputMode> PlainInputMethod::inputModes(const QString &locale case QLocale::GreekScript: result.append(InputEngine::Greek); break; + case QLocale::CyrillicScript: + result.append(InputEngine::Cyrillic); + break; default: break; } diff --git a/src/virtualkeyboard/t9writeinputmethod.cpp b/src/virtualkeyboard/t9writeinputmethod.cpp index 41b2592a..1eb11cc7 100644 --- a/src/virtualkeyboard/t9writeinputmethod.cpp +++ b/src/virtualkeyboard/t9writeinputmethod.cpp @@ -708,6 +708,15 @@ public: symbolCategories.append(DECUMA_CATEGORY_CONTRACTION_MARK); break; + case InputEngine::Cyrillic: + symbolCategories.append(DECUMA_CATEGORY_CYRILLIC); + symbolCategories.append(DECUMA_CATEGORY_QUEST_EXCL_MARK_PUNCTUATIONS); + symbolCategories.append(DECUMA_CATEGORY_PERIOD_COMMA_PUNCTUATIONS); + // Ukrainian needs contraction mark, but not Russian or Bulgarian + if (language == DECUMA_LANG_UK) + symbolCategories.append(DECUMA_CATEGORY_CONTRACTION_MARK); + break; + default: qWarning() << "Handwriting is not supported in" << locale.name(); return false; @@ -1536,6 +1545,9 @@ QList<InputEngine::InputMode> T9WriteInputMethod::inputModes(const QString &loca case QLocale::GreekScript: availableInputModes.append(InputEngine::Greek); break; + case QLocale::CyrillicScript: + availableInputModes.append(InputEngine::Cyrillic); + break; default: break; } diff --git a/src/virtualkeyboard/virtualkeyboard.pro b/src/virtualkeyboard/virtualkeyboard.pro index 4dab3247..d550b3c8 100644 --- a/src/virtualkeyboard/virtualkeyboard.pro +++ b/src/virtualkeyboard/virtualkeyboard.pro @@ -85,6 +85,13 @@ contains(CONFIG, lang-ar.*) { content/layouts/ar_AR/numbers.qml \ content/layouts/ar_AR/symbols.qml } +contains(CONFIG, lang-bg.*) { + LAYOUT_FILES += \ + content/layouts/bg_BG/main.qml \ + content/layouts/bg_BG/symbols.qml +t9write-alphabetic: LAYOUT_FILES += \ + content/layouts/bg_BG/handwriting.qml +} contains(CONFIG, lang-da.*) { LAYOUT_FILES += \ content/layouts/da_DK/main.qml \ |