diff options
author | Jarkko Koivikko <jarkko.koivikko@code-q.fi> | 2017-08-21 14:13:41 +0300 |
---|---|---|
committer | Jarkko Koivikko <jarkko.koivikko@code-q.fi> | 2017-08-24 13:56:15 +0000 |
commit | fe6c501cd833455b90bfe5866f8967e56e37f593 (patch) | |
tree | 145ec6182af2db77f146137ee3cfdc72fa7db6a7 /src | |
parent | dc4e962fab576e7c6dd1b5f1b08a71b08fadfc15 (diff) |
Add Hebrew keyboard layout
[ChangeLog] Added Hebrew keyboard layout.
Change-Id: I7779db4e5ac3c5a99937a0d7b7e572db65f0d811
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src')
18 files changed, 917 insertions, 4 deletions
diff --git a/src/config.pri b/src/config.pri index 18a1116a..21ba6842 100644 --- a/src/config.pri +++ b/src/config.pri @@ -43,6 +43,7 @@ disable-layouts { lang-fa_FA \ lang-fi_FI \ lang-fr_FR \ + lang-he_IL \ lang-hi_IN \ lang-hr_HR \ lang-hu_HU \ diff --git a/src/virtualkeyboard/3rdparty/t9write/t9write.pro b/src/virtualkeyboard/3rdparty/t9write/t9write.pro index 1a41a03d..d64f831d 100644 --- a/src/virtualkeyboard/3rdparty/t9write/t9write.pro +++ b/src/virtualkeyboard/3rdparty/t9write/t9write.pro @@ -4,6 +4,7 @@ CONFIG += static T9WRITE_RESOURCE_FILES = \ $$files(data/arabic/*.bin) \ + $$files(data/hebrew/*.bin) \ $$files(data/*.bin) \ $$files(data/*.ldb) \ $$files(data/*.hdb) \ diff --git a/src/virtualkeyboard/3rdparty/t9write/unpack.py b/src/virtualkeyboard/3rdparty/t9write/unpack.py index 66ad4f0c..18a44501 100644 --- a/src/virtualkeyboard/3rdparty/t9write/unpack.py +++ b/src/virtualkeyboard/3rdparty/t9write/unpack.py @@ -93,6 +93,9 @@ UNPACK_RULES = { 'data/arabic': [ '*/Arabic/_databas_le.bin', ], +'data/hebrew': [ + '*/Hebrew/_databas_le.bin', +], 'data': [ '*/_databas_le.bin', '*/*.hdb', diff --git a/src/virtualkeyboard/content/components/InputModeKey.qml b/src/virtualkeyboard/content/components/InputModeKey.qml index feec20b5..c4463a8e 100644 --- a/src/virtualkeyboard/content/components/InputModeKey.qml +++ b/src/virtualkeyboard/content/components/InputModeKey.qml @@ -71,6 +71,7 @@ Key { "ΑΒΓ", // InputEngine.Greek "АБВ", // InputEngine.Cyrillic "\u0623\u200C\u0628\u200C\u062C", // InputEngine.Arabic + "\u05D0\u05D1\u05D2", // InputEngine.Hebrew "中文", // InputEngine.ChineseHandwriting "日本語", // InputEngine.JapaneseHandwriting "한국어", // InputEngine.KoreanHandwriting diff --git a/src/virtualkeyboard/content/layouts/he_IL/handwriting.qml b/src/virtualkeyboard/content/layouts/he_IL/handwriting.qml new file mode 100644 index 00000000..321fbd42 --- /dev/null +++ b/src/virtualkeyboard/content/layouts/he_IL/handwriting.qml @@ -0,0 +1,99 @@ +/**************************************************************************** +** +** Copyright (C) 2016 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.Hebrew ? [] : + [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/he_IL/main.qml b/src/virtualkeyboard/content/layouts/he_IL/main.qml new file mode 100644 index 00000000..fde3cb4b --- /dev/null +++ b/src/virtualkeyboard/content/layouts/he_IL/main.qml @@ -0,0 +1,381 @@ +/**************************************************************************** +** +** 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.Hebrew ? hebrewLayout : latinLayout + Component { + id: hebrewLayout + KeyboardLayout { + keyWeight: 160 + KeyboardRow { + Key { + key: Qt.Key_Apostrophe + text: "'" + alternativeKeys: "'\"" + } + Key { + key: Qt.Key_Minus + text: "-" + } + Key { + text: "\u05E7" + alternativeKeys: "\u05B3\u05E7\u05B8\u05BB" + } + Key { + text: "\u05E8" + } + Key { + text: "\u05D0" + } + Key { + text: "\u05D8" + } + Key { + text: "\u05D5" + alternativeKeys: [ "\u05D5", "\u05D5\u05B9", "\u05D5\u05BC" ] + } + Key { + text: "\u05DF" + } + Key { + text: "\u05DD" + } + Key { + text: "\u05E4" + alternativeKeys: "\u05B2\u05B7\u05E4" + } + BackspaceKey {} + } + KeyboardRow { + FillerKey { + weight: 56 + } + Key { + text: "\u05E9" + alternativeKeys: [ "\u05E9", "\u05B0", "\u05E9\u05C2", "\u05E9\u05C1" ] + } + Key { + text: "\u05D3" + alternativeKeys: "\u05D3\u05BC" + } + Key { + text: "\u05D2" + alternativeKeys: [ "\u05D2", "\u05D2\u05F3" ] + } + Key { + text: "\u05DB" + } + Key { + text: "\u05E2" + } + Key { + text: "\u05D9" + alternativeKeys: [ "\u05D9", "\u05F2\u05B7" ] + } + Key { + text: "\u05D7" + alternativeKeys: [ "\u05B9", "\u05D7", "\u05D7\u05F3", "\u05B4" ] + } + Key { + text: "\u05DC" + } + Key { + text: "\u05DA" + } + Key { + text: "\u05E3" + } + EnterKey { + weight: 283 + } + } + KeyboardRow { + keyWeight: 156 + InputModeKey { + inputModes: [InputEngine.Hebrew, InputEngine.Latin] + } + Key { + text: "\u05D6" + alternativeKeys: [ "\u05D6", "\u05D6\u05F3" ] + } + Key { + text: "\u05E1" + alternativeKeys: "\u05E1\u05B6\u05B1" + } + Key { + text: "\u05D1" + } + Key { + text: "\u05D4" + } + Key { + text: "\u05E0" + } + Key { + text: "\u05DE" + } + Key { + text: "\u05E6" + alternativeKeys: [ "\u05E6", "\u05E6\u05F3", "\u05B5" ] + } + Key { + text: "\u05EA" + alternativeKeys: [ "\u05EA", "\u05EA\u05F3" ] + } + Key { + text: "\u05E5" + alternativeKeys: [ "\u05E5", "\u05E5\u05F3" ] + } + Key { + key: Qt.Key_Comma + text: "," + alternativeKeys: ":,;" + } + ShiftKey { + weight: 204 + enabled: false + } + } + KeyboardRow { + keyWeight: 154 + SymbolModeKey { + weight: 217 + } + ChangeLanguageKey { + weight: 154 + } + HandwritingModeKey { + weight: 154 + } + SpaceKey { + weight: 864 + } + Key { + key: Qt.Key_Period + text: "." + alternativeKeys: "!.?" + } + 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: "aäåãâàá" + } + 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 { + inputModes: [InputEngine.Hebrew, 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: "," + alternativeKeys: ":,;" + } + 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 + } + } + } + } +} diff --git a/src/virtualkeyboard/content/layouts/he_IL/symbols.qml b/src/virtualkeyboard/content/layouts/he_IL/symbols.qml new file mode 100644 index 00000000..866a91a7 --- /dev/null +++ b/src/virtualkeyboard/content/layouts/he_IL/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.Hebrew ? "\u05D0\u05D1\u05D2" : "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: "$" + alternativeKeys: "$¢" + } + Key { + key: 0x20AC + text: "€" + } + Key { + key: 0xC2 + text: "£" + } + Key { + 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.Hebrew ? "\u05D0\u05D1\u05D2" : "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 a30bcb51..002bc5d6 100644 --- a/src/virtualkeyboard/content/styles/default/style.qml +++ b/src/virtualkeyboard/content/styles/default/style.qml @@ -773,6 +773,8 @@ KeyboardStyle { if (InputContext.locale.substring(0, 2) === "fa") return "\u0627\u200C\u0628\u200C\u067E" return "\u0623\u200C\u0628\u200C\u062C" + case InputEngine.Hebrew: + return "\u05D0\u05D1\u05D2" 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 16dfe7fc..0a76a7e7 100644 --- a/src/virtualkeyboard/content/styles/retro/style.qml +++ b/src/virtualkeyboard/content/styles/retro/style.qml @@ -887,6 +887,8 @@ KeyboardStyle { if (InputContext.locale.substring(0, 2) === "fa") return "\u0627\u200C\u0628\u200C\u067E" return "\u0623\u200C\u0628\u200C\u062C" + case InputEngine.Hebrew: + return "\u05D0\u05D1\u05D2" case InputEngine.ChineseHandwriting: return "中文" case InputEngine.JapaneseHandwriting: diff --git a/src/virtualkeyboard/doc/src/build.qdoc b/src/virtualkeyboard/doc/src/build.qdoc index a38af1a5..a858cdea 100644 --- a/src/virtualkeyboard/doc/src/build.qdoc +++ b/src/virtualkeyboard/doc/src/build.qdoc @@ -316,6 +316,8 @@ $ python unpack.py T9Write_Alpha_v7-8-0_SDK.zip . ├─── data │ ├─── arabic │ │ └─── *.bin [T9 Write Arabic] + │ ├─── hebrew + │ │ └─── *.bin [T9 Write Hebrew] │ ├─── *.bin [T9 Write Alphabetic] │ ├─── *.hdb │ ├─── *.phd diff --git a/src/virtualkeyboard/doc/src/qtvirtualkeyboard-index.qdoc b/src/virtualkeyboard/doc/src/qtvirtualkeyboard-index.qdoc index 0239f5cf..21be028c 100644 --- a/src/virtualkeyboard/doc/src/qtvirtualkeyboard-index.qdoc +++ b/src/virtualkeyboard/doc/src/qtvirtualkeyboard-index.qdoc @@ -50,7 +50,7 @@ \li Automatic capitalization and space insertion. \li Scalability to different resolutions. \li Support for different character sets (Latin, Simplified/Traditional Chinese, - Hindi, Japanese, Arabic, Korean, and others). + Hindi, Japanese, Arabic, Hebrew, Korean, and others). \li Support for most common input \l {Supported Languages}{languages}, with possibility to easily extend the language support. \li Left-to-right and right-to-left input. @@ -77,6 +77,7 @@ \li French \li German \li Greek + \li Hebrew \li Hindi \li Hungarian \li Italian diff --git a/src/virtualkeyboard/hunspellinputmethod.cpp b/src/virtualkeyboard/hunspellinputmethod.cpp index c77e3265..76b5f654 100644 --- a/src/virtualkeyboard/hunspellinputmethod.cpp +++ b/src/virtualkeyboard/hunspellinputmethod.cpp @@ -64,6 +64,9 @@ QList<InputEngine::InputMode> HunspellInputMethod::inputModes(const QString &loc case QLocale::ArabicScript: result.append(InputEngine::Arabic); break; + case QLocale::HebrewScript: + result.append(InputEngine::Hebrew); + break; default: break; } diff --git a/src/virtualkeyboard/inputengine.cpp b/src/virtualkeyboard/inputengine.cpp index 8b1a1cbd..43b0c1cc 100644 --- a/src/virtualkeyboard/inputengine.cpp +++ b/src/virtualkeyboard/inputengine.cpp @@ -767,6 +767,7 @@ void InputEngine::timerEvent(QTimerEvent *timerEvent) \li \c InputEngine.Greek Greek input mode. \li \c InputEngine.Cyrillic Cyrillic input mode. \li \c InputEngine.Arabic Arabic input mode. + \li \c InputEngine.Hebrew Hebrew input mode. \li \c InputEngine.ChineseHandwriting Chinese handwriting. \li \c InputEngine.JapaneseHandwriting Japanese handwriting. \li \c InputEngine.KoreanHandwriting Korean handwriting. @@ -843,6 +844,8 @@ void InputEngine::timerEvent(QTimerEvent *timerEvent) Cyrillic input mode. \value Arabic Arabic input mode. + \value Hebrew + Hebrew input mode. */ /*! diff --git a/src/virtualkeyboard/inputengine.h b/src/virtualkeyboard/inputengine.h index 9f6ed0d0..66eb2c3d 100644 --- a/src/virtualkeyboard/inputengine.h +++ b/src/virtualkeyboard/inputengine.h @@ -77,6 +77,7 @@ public: Greek, Cyrillic, Arabic, + Hebrew, ChineseHandwriting, JapaneseHandwriting, KoreanHandwriting diff --git a/src/virtualkeyboard/plaininputmethod.cpp b/src/virtualkeyboard/plaininputmethod.cpp index 3b1465d2..2ca10cb4 100644 --- a/src/virtualkeyboard/plaininputmethod.cpp +++ b/src/virtualkeyboard/plaininputmethod.cpp @@ -60,6 +60,9 @@ QList<InputEngine::InputMode> PlainInputMethod::inputModes(const QString &locale case QLocale::ArabicScript: result.append(InputEngine::Arabic); break; + case QLocale::HebrewScript: + result.append(InputEngine::Hebrew); + break; default: break; } diff --git a/src/virtualkeyboard/shifthandler.cpp b/src/virtualkeyboard/shifthandler.cpp index 19117c81..8f42a762 100644 --- a/src/virtualkeyboard/shifthandler.cpp +++ b/src/virtualkeyboard/shifthandler.cpp @@ -50,7 +50,7 @@ public: shiftChanged(false), resetWhenVisible(false), manualShiftLanguageFilter(QSet<QLocale::Language>() << QLocale::Arabic << QLocale::Persian << QLocale::Hindi << QLocale::Korean), - manualCapsInputModeFilter(QSet<InputEngine::InputMode>() << InputEngine::Cangjie << InputEngine::Zhuyin), + manualCapsInputModeFilter(QSet<InputEngine::InputMode>() << InputEngine::Cangjie << InputEngine::Zhuyin << InputEngine::Hebrew), noAutoUppercaseInputModeFilter(QSet<InputEngine::InputMode>() << InputEngine::FullwidthLatin << InputEngine::Pinyin << InputEngine::Cangjie << InputEngine::Zhuyin << InputEngine::ChineseHandwriting << InputEngine::JapaneseHandwriting << InputEngine::KoreanHandwriting), allCapsInputModeFilter(QSet<InputEngine::InputMode>() << InputEngine::Hiragana << InputEngine::Katakana) { diff --git a/src/virtualkeyboard/t9writeinputmethod.cpp b/src/virtualkeyboard/t9writeinputmethod.cpp index baecbf47..42bd6ad1 100644 --- a/src/virtualkeyboard/t9writeinputmethod.cpp +++ b/src/virtualkeyboard/t9writeinputmethod.cpp @@ -110,6 +110,7 @@ public: EngineUninitialized, Alphabetic, Arabic, + Hebrew, SimplifiedChinese, TraditionalChinese, HongKongChinese, @@ -192,6 +193,7 @@ public: switch (newEngineMode) { case Alphabetic: case Arabic: + case Hebrew: cjk = false; break; case SimplifiedChinese: @@ -301,6 +303,9 @@ public: case Arabic: hwrDbPath.append(QLatin1String("arabic/_databas_le.bin")); break; + case Hebrew: + hwrDbPath.append(QLatin1String("hebrew/_databas_le.bin")); + break; case SimplifiedChinese: hwrDbPath.append(QLatin1String("cjk_S_gb18030_le.hdb")); break; @@ -473,9 +478,14 @@ public: #endif #ifdef HAVE_T9WRITE_ALPHABETIC - if (locale.script() == QLocale::ArabicScript) + switch (locale.script()) { + case QLocale::ArabicScript: return T9WriteInputMethodPrivate::Arabic; - return T9WriteInputMethodPrivate::Alphabetic; + case QLocale::HebrewScript: + return T9WriteInputMethodPrivate::Hebrew; + default: + return T9WriteInputMethodPrivate::Alphabetic; + } #else return T9WriteInputMethodPrivate::EngineUninitialized; #endif @@ -642,6 +652,9 @@ public: } else if (language == DECUMA_LANG_AR || language == DECUMA_LANG_FA) { if (inputMode != InputEngine::Arabic && inputMode != InputEngine::Numeric) language = DECUMA_LANG_EN; + } else if (language == DECUMA_LANG_IW) { + if (inputMode != InputEngine::Hebrew) + language = DECUMA_LANG_EN; } return language; @@ -742,6 +755,14 @@ public: leftToRightGestures = false; break; + case InputEngine::Hebrew: + symbolCategories.append(DECUMA_CATEGORY_HEBREW_GL_HEBREW_CURSIVE_MODE); + symbolCategories.append(DECUMA_CATEGORY_HEBREW_GL_HEBREW_LETTERSYMBOLS); + symbolCategories.append(DECUMA_CATEGORY_HEBREW_SHEQEL); + symbolCategories.append(DECUMA_CATEGORY_ARABIC_GESTURES); + leftToRightGestures = false; + break; + default: qWarning() << "Handwriting is not supported in" << locale.name(); return false; @@ -1585,6 +1606,12 @@ QList<InputEngine::InputMode> T9WriteInputMethod::inputModes(const QString &loca if (!(inputMethodHints & (Qt::ImhDialableCharactersOnly | Qt::ImhFormattedNumbersOnly | Qt::ImhDigitsOnly | Qt::ImhLatinOnly))) availableInputModes.append(InputEngine::Arabic); break; + case T9WriteInputMethodPrivate::Hebrew: + if (d->findHwrDb(T9WriteInputMethodPrivate::Hebrew, d->defaultHwrDbPath).isEmpty()) + return availableInputModes; + if (!(inputMethodHints & (Qt::ImhDialableCharactersOnly | Qt::ImhFormattedNumbersOnly | Qt::ImhDigitsOnly | Qt::ImhLatinOnly))) + availableInputModes.append(InputEngine::Hebrew); + break; #endif #ifdef HAVE_T9WRITE_CJK case T9WriteInputMethodPrivate::SimplifiedChinese: diff --git a/src/virtualkeyboard/virtualkeyboard.pro b/src/virtualkeyboard/virtualkeyboard.pro index deac2944..2b2f2aac 100644 --- a/src/virtualkeyboard/virtualkeyboard.pro +++ b/src/virtualkeyboard/virtualkeyboard.pro @@ -159,6 +159,13 @@ contains(CONFIG, lang-fr.*) { t9write-alphabetic: LAYOUT_FILES += \ content/layouts/fr_FR/handwriting.qml } +contains(CONFIG, lang-he.*) { + LAYOUT_FILES += \ + content/layouts/he_IL/main.qml \ + content/layouts/he_IL/symbols.qml +t9write-alphabetic: LAYOUT_FILES += \ + content/layouts/he_IL/handwriting.qml +} contains(CONFIG, lang-hi.*) { LAYOUT_FILES += \ content/layouts/hi_IN/main.qml \ |