aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2016-02-24 11:28:43 +0100
committerLiang Qi <liang.qi@theqtcompany.com>2016-02-24 11:28:43 +0100
commitf610c62841fdfca4a155377b7f0fbbc60b100c3c (patch)
tree6a378bde836fff630a1bcd5fa22ea28cc68bc4b8
parent7207078b83c79cba7e6cec3967bf9308b9267ffb (diff)
parent1f14cf01ffeca6c10cdcea586cd2b4ac0ad718a6 (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7v5.7.0-alpha1
-rw-r--r--src/virtualkeyboard/content/components/HandwritingModeKey.qml3
-rw-r--r--src/virtualkeyboard/content/components/Keyboard.qml5
-rw-r--r--src/virtualkeyboard/content/layouts/da_DK/handwriting.qml96
-rw-r--r--src/virtualkeyboard/content/layouts/da_DK/main.qml3
-rw-r--r--src/virtualkeyboard/content/layouts/de_DE/handwriting.qml96
-rw-r--r--src/virtualkeyboard/content/layouts/de_DE/main.qml3
-rw-r--r--src/virtualkeyboard/content/layouts/es_ES/handwriting.qml96
-rw-r--r--src/virtualkeyboard/content/layouts/es_ES/main.qml3
-rw-r--r--src/virtualkeyboard/content/layouts/fi_FI/handwriting.qml96
-rw-r--r--src/virtualkeyboard/content/layouts/fi_FI/main.qml3
-rw-r--r--src/virtualkeyboard/content/layouts/fr_FR/handwriting.qml96
-rw-r--r--src/virtualkeyboard/content/layouts/fr_FR/main.qml3
-rw-r--r--src/virtualkeyboard/content/layouts/it_IT/handwriting.qml96
-rw-r--r--src/virtualkeyboard/content/layouts/it_IT/main.qml3
-rw-r--r--src/virtualkeyboard/content/layouts/nb_NO/handwriting.qml96
-rw-r--r--src/virtualkeyboard/content/layouts/nb_NO/main.qml3
-rw-r--r--src/virtualkeyboard/content/layouts/pl_PL/handwriting.qml96
-rw-r--r--src/virtualkeyboard/content/layouts/pl_PL/main.qml3
-rw-r--r--src/virtualkeyboard/content/layouts/pt_PT/handwriting.qml96
-rw-r--r--src/virtualkeyboard/content/layouts/pt_PT/main.qml3
-rw-r--r--src/virtualkeyboard/content/layouts/ru_RU/handwriting.qml96
-rw-r--r--src/virtualkeyboard/content/layouts/ru_RU/main.qml3
-rw-r--r--src/virtualkeyboard/content/layouts/sv_SE/handwriting.qml96
-rw-r--r--src/virtualkeyboard/content/layouts/sv_SE/main.qml3
-rw-r--r--src/virtualkeyboard/content/layouts/zh_TW/main.qml6
-rw-r--r--src/virtualkeyboard/doc/src/technical-guide.qdoc47
-rw-r--r--src/virtualkeyboard/t9writeinputmethod.cpp5
-rw-r--r--src/virtualkeyboard/virtualkeyboard.pro22
-rw-r--r--src/virtualkeyboard/virtualkeyboardsettings.cpp15
29 files changed, 1181 insertions, 11 deletions
diff --git a/src/virtualkeyboard/content/components/HandwritingModeKey.qml b/src/virtualkeyboard/content/components/HandwritingModeKey.qml
index 296316ed..f956b2fb 100644
--- a/src/virtualkeyboard/content/components/HandwritingModeKey.qml
+++ b/src/virtualkeyboard/content/components/HandwritingModeKey.qml
@@ -39,6 +39,9 @@ import QtQuick 2.0
\brief Hand writing mode key for keyboard layouts.
This key toggles between the handwriting mode layout and the main layout.
+
+ The key is automatically hidden from the keyboard layout if handwriting support
+ is not enabled for the virtual keyboard.
*/
Key {
diff --git a/src/virtualkeyboard/content/components/Keyboard.qml b/src/virtualkeyboard/content/components/Keyboard.qml
index dab8c277..d4783a6d 100644
--- a/src/virtualkeyboard/content/components/Keyboard.qml
+++ b/src/virtualkeyboard/content/components/Keyboard.qml
@@ -1012,7 +1012,10 @@ Item {
// Update list of custom locale indices
newIndices = []
for (i = 0; i < availableLocaleIndices.length; i++) {
- if (availableLocaleIndices[i] === localeIndex || (availableLocaleIndices[i] !== baseLayoutIndex && layoutExists(layoutsModel.get(availableLocaleIndices[i], "fileName"), layoutType)))
+ if (availableLocaleIndices[i] === localeIndex ||
+ ((availableLocaleIndices[i] !== baseLayoutIndex ||
+ (layoutType === "handwriting" && availableLocaleIndices.indexOf(baseLayoutIndex) !== -1)) &&
+ layoutExists(layoutsModel.get(availableLocaleIndices[i], "fileName"), layoutType)))
newIndices.push(availableLocaleIndices[i])
}
availableCustomLocaleIndices = newIndices
diff --git a/src/virtualkeyboard/content/layouts/da_DK/handwriting.qml b/src/virtualkeyboard/content/layouts/da_DK/handwriting.qml
new file mode 100644
index 00000000..1a505e7e
--- /dev/null
+++ b/src/virtualkeyboard/content/layouts/da_DK/handwriting.qml
@@ -0,0 +1,96 @@
+/******************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Virtual Keyboard module.
+**
+** $QT_BEGIN_LICENSE:COMM$
+**
+** 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 http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** $QT_END_LICENSE$
+**
+******************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Layouts 1.0
+import QtQuick.Enterprise.VirtualKeyboard 2.0
+
+KeyboardLayout {
+ function createInputMethod() {
+ return Qt.createQmlObject('import QtQuick 2.0; import QtQuick.Enterprise.VirtualKeyboard 2.0; HandwritingInputMethod {}', parent)
+ }
+ sharedLayouts: ['symbols']
+ inputMode: InputEngine.Latin
+
+ KeyboardRow {
+ Layout.preferredHeight: 3
+ KeyboardColumn {
+ Layout.preferredWidth: bottomRow.width - hideKeyboardKey.width
+ KeyboardRow {
+ TraceInputKey {
+ objectName: "hwrInputArea"
+ patternRecognitionMode: InputEngine.HandwritingRecoginition
+ }
+ }
+ }
+ KeyboardColumn {
+ Layout.preferredWidth: hideKeyboardKey.width
+ KeyboardRow {
+ BackspaceKey {}
+ }
+ KeyboardRow {
+ EnterKey {}
+ }
+ KeyboardRow {
+ ShiftKey { }
+ }
+ }
+ }
+ KeyboardRow {
+ id: bottomRow
+ Layout.preferredHeight: 1
+ keyWeight: 154
+ Key {
+ weight: 217
+ key: Qt.Key_Mode_switch
+ noKeyEvent: true
+ functionKey: true
+ text: InputContext.inputEngine.inputMode === InputEngine.Latin ? "123" : "ABC"
+ onClicked: InputContext.inputEngine.inputMode = InputContext.inputEngine.inputMode === InputEngine.Latin ? InputEngine.Numeric : InputEngine.Latin
+ enabled: !(InputContext.inputMethodHints & (Qt.ImhDialableCharactersOnly | Qt.ImhFormattedNumbersOnly | Qt.ImhDigitsOnly))
+ keyPanelDelegate: keyboard.style ? keyboard.style.symbolKeyPanel : undefined
+ }
+ 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/da_DK/main.qml b/src/virtualkeyboard/content/layouts/da_DK/main.qml
index 54829e3d..1f9f43ca 100644
--- a/src/virtualkeyboard/content/layouts/da_DK/main.qml
+++ b/src/virtualkeyboard/content/layouts/da_DK/main.qml
@@ -193,6 +193,9 @@ KeyboardLayout {
ChangeLanguageKey {
weight: 154
}
+ HandwritingModeKey {
+ weight: 154
+ }
SpaceKey {
weight: 864
}
diff --git a/src/virtualkeyboard/content/layouts/de_DE/handwriting.qml b/src/virtualkeyboard/content/layouts/de_DE/handwriting.qml
new file mode 100644
index 00000000..1a505e7e
--- /dev/null
+++ b/src/virtualkeyboard/content/layouts/de_DE/handwriting.qml
@@ -0,0 +1,96 @@
+/******************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Virtual Keyboard module.
+**
+** $QT_BEGIN_LICENSE:COMM$
+**
+** 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 http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** $QT_END_LICENSE$
+**
+******************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Layouts 1.0
+import QtQuick.Enterprise.VirtualKeyboard 2.0
+
+KeyboardLayout {
+ function createInputMethod() {
+ return Qt.createQmlObject('import QtQuick 2.0; import QtQuick.Enterprise.VirtualKeyboard 2.0; HandwritingInputMethod {}', parent)
+ }
+ sharedLayouts: ['symbols']
+ inputMode: InputEngine.Latin
+
+ KeyboardRow {
+ Layout.preferredHeight: 3
+ KeyboardColumn {
+ Layout.preferredWidth: bottomRow.width - hideKeyboardKey.width
+ KeyboardRow {
+ TraceInputKey {
+ objectName: "hwrInputArea"
+ patternRecognitionMode: InputEngine.HandwritingRecoginition
+ }
+ }
+ }
+ KeyboardColumn {
+ Layout.preferredWidth: hideKeyboardKey.width
+ KeyboardRow {
+ BackspaceKey {}
+ }
+ KeyboardRow {
+ EnterKey {}
+ }
+ KeyboardRow {
+ ShiftKey { }
+ }
+ }
+ }
+ KeyboardRow {
+ id: bottomRow
+ Layout.preferredHeight: 1
+ keyWeight: 154
+ Key {
+ weight: 217
+ key: Qt.Key_Mode_switch
+ noKeyEvent: true
+ functionKey: true
+ text: InputContext.inputEngine.inputMode === InputEngine.Latin ? "123" : "ABC"
+ onClicked: InputContext.inputEngine.inputMode = InputContext.inputEngine.inputMode === InputEngine.Latin ? InputEngine.Numeric : InputEngine.Latin
+ enabled: !(InputContext.inputMethodHints & (Qt.ImhDialableCharactersOnly | Qt.ImhFormattedNumbersOnly | Qt.ImhDigitsOnly))
+ keyPanelDelegate: keyboard.style ? keyboard.style.symbolKeyPanel : undefined
+ }
+ 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/de_DE/main.qml b/src/virtualkeyboard/content/layouts/de_DE/main.qml
index 33cfd388..5421569f 100644
--- a/src/virtualkeyboard/content/layouts/de_DE/main.qml
+++ b/src/virtualkeyboard/content/layouts/de_DE/main.qml
@@ -188,6 +188,9 @@ KeyboardLayout {
ChangeLanguageKey {
weight: 154
}
+ HandwritingModeKey {
+ weight: 154
+ }
SpaceKey {
weight: 864
}
diff --git a/src/virtualkeyboard/content/layouts/es_ES/handwriting.qml b/src/virtualkeyboard/content/layouts/es_ES/handwriting.qml
new file mode 100644
index 00000000..0bdab338
--- /dev/null
+++ b/src/virtualkeyboard/content/layouts/es_ES/handwriting.qml
@@ -0,0 +1,96 @@
+/******************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Virtual Keyboard module.
+**
+** $QT_BEGIN_LICENSE:COMM$
+**
+** 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 http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** $QT_END_LICENSE$
+**
+******************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Layouts 1.0
+import QtQuick.Enterprise.VirtualKeyboard 2.0
+
+KeyboardLayout {
+ function createInputMethod() {
+ return Qt.createQmlObject('import QtQuick 2.0; import QtQuick.Enterprise.VirtualKeyboard 2.0; HandwritingInputMethod {}', parent)
+ }
+ sharedLayouts: ['symbols']
+ inputMode: InputEngine.Latin
+
+ KeyboardRow {
+ Layout.preferredHeight: 3
+ KeyboardColumn {
+ Layout.preferredWidth: bottomRow.width - hideKeyboardKey.width
+ KeyboardRow {
+ TraceInputKey {
+ objectName: "hwrInputArea"
+ patternRecognitionMode: InputEngine.HandwritingRecoginition
+ }
+ }
+ }
+ KeyboardColumn {
+ Layout.preferredWidth: hideKeyboardKey.width
+ KeyboardRow {
+ BackspaceKey {}
+ }
+ KeyboardRow {
+ EnterKey {}
+ }
+ KeyboardRow {
+ ShiftKey { }
+ }
+ }
+ }
+ KeyboardRow {
+ id: bottomRow
+ Layout.preferredHeight: 1
+ keyWeight: 154
+ Key {
+ weight: 217
+ key: Qt.Key_Mode_switch
+ noKeyEvent: true
+ functionKey: true
+ text: InputContext.inputEngine.inputMode === InputEngine.Latin ? "123" : "ABC"
+ onClicked: InputContext.inputEngine.inputMode = InputContext.inputEngine.inputMode === InputEngine.Latin ? InputEngine.Numeric : InputEngine.Latin
+ enabled: !(InputContext.inputMethodHints & (Qt.ImhDialableCharactersOnly | Qt.ImhFormattedNumbersOnly | Qt.ImhDigitsOnly))
+ keyPanelDelegate: keyboard.style ? keyboard.style.symbolKeyPanel : undefined
+ }
+ 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/es_ES/main.qml b/src/virtualkeyboard/content/layouts/es_ES/main.qml
index eb055b1f..c4eab9a8 100644
--- a/src/virtualkeyboard/content/layouts/es_ES/main.qml
+++ b/src/virtualkeyboard/content/layouts/es_ES/main.qml
@@ -188,6 +188,9 @@ KeyboardLayout {
ChangeLanguageKey {
weight: 154
}
+ HandwritingModeKey {
+ weight: 154
+ }
SpaceKey {
weight: 864
}
diff --git a/src/virtualkeyboard/content/layouts/fi_FI/handwriting.qml b/src/virtualkeyboard/content/layouts/fi_FI/handwriting.qml
new file mode 100644
index 00000000..1a505e7e
--- /dev/null
+++ b/src/virtualkeyboard/content/layouts/fi_FI/handwriting.qml
@@ -0,0 +1,96 @@
+/******************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Virtual Keyboard module.
+**
+** $QT_BEGIN_LICENSE:COMM$
+**
+** 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 http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** $QT_END_LICENSE$
+**
+******************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Layouts 1.0
+import QtQuick.Enterprise.VirtualKeyboard 2.0
+
+KeyboardLayout {
+ function createInputMethod() {
+ return Qt.createQmlObject('import QtQuick 2.0; import QtQuick.Enterprise.VirtualKeyboard 2.0; HandwritingInputMethod {}', parent)
+ }
+ sharedLayouts: ['symbols']
+ inputMode: InputEngine.Latin
+
+ KeyboardRow {
+ Layout.preferredHeight: 3
+ KeyboardColumn {
+ Layout.preferredWidth: bottomRow.width - hideKeyboardKey.width
+ KeyboardRow {
+ TraceInputKey {
+ objectName: "hwrInputArea"
+ patternRecognitionMode: InputEngine.HandwritingRecoginition
+ }
+ }
+ }
+ KeyboardColumn {
+ Layout.preferredWidth: hideKeyboardKey.width
+ KeyboardRow {
+ BackspaceKey {}
+ }
+ KeyboardRow {
+ EnterKey {}
+ }
+ KeyboardRow {
+ ShiftKey { }
+ }
+ }
+ }
+ KeyboardRow {
+ id: bottomRow
+ Layout.preferredHeight: 1
+ keyWeight: 154
+ Key {
+ weight: 217
+ key: Qt.Key_Mode_switch
+ noKeyEvent: true
+ functionKey: true
+ text: InputContext.inputEngine.inputMode === InputEngine.Latin ? "123" : "ABC"
+ onClicked: InputContext.inputEngine.inputMode = InputContext.inputEngine.inputMode === InputEngine.Latin ? InputEngine.Numeric : InputEngine.Latin
+ enabled: !(InputContext.inputMethodHints & (Qt.ImhDialableCharactersOnly | Qt.ImhFormattedNumbersOnly | Qt.ImhDigitsOnly))
+ keyPanelDelegate: keyboard.style ? keyboard.style.symbolKeyPanel : undefined
+ }
+ 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/fi_FI/main.qml b/src/virtualkeyboard/content/layouts/fi_FI/main.qml
index 53340766..39b56ae6 100644
--- a/src/virtualkeyboard/content/layouts/fi_FI/main.qml
+++ b/src/virtualkeyboard/content/layouts/fi_FI/main.qml
@@ -187,6 +187,9 @@ KeyboardLayout {
ChangeLanguageKey {
weight: 154
}
+ HandwritingModeKey {
+ weight: 154
+ }
SpaceKey {
weight: 864
}
diff --git a/src/virtualkeyboard/content/layouts/fr_FR/handwriting.qml b/src/virtualkeyboard/content/layouts/fr_FR/handwriting.qml
new file mode 100644
index 00000000..1a505e7e
--- /dev/null
+++ b/src/virtualkeyboard/content/layouts/fr_FR/handwriting.qml
@@ -0,0 +1,96 @@
+/******************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Virtual Keyboard module.
+**
+** $QT_BEGIN_LICENSE:COMM$
+**
+** 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 http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** $QT_END_LICENSE$
+**
+******************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Layouts 1.0
+import QtQuick.Enterprise.VirtualKeyboard 2.0
+
+KeyboardLayout {
+ function createInputMethod() {
+ return Qt.createQmlObject('import QtQuick 2.0; import QtQuick.Enterprise.VirtualKeyboard 2.0; HandwritingInputMethod {}', parent)
+ }
+ sharedLayouts: ['symbols']
+ inputMode: InputEngine.Latin
+
+ KeyboardRow {
+ Layout.preferredHeight: 3
+ KeyboardColumn {
+ Layout.preferredWidth: bottomRow.width - hideKeyboardKey.width
+ KeyboardRow {
+ TraceInputKey {
+ objectName: "hwrInputArea"
+ patternRecognitionMode: InputEngine.HandwritingRecoginition
+ }
+ }
+ }
+ KeyboardColumn {
+ Layout.preferredWidth: hideKeyboardKey.width
+ KeyboardRow {
+ BackspaceKey {}
+ }
+ KeyboardRow {
+ EnterKey {}
+ }
+ KeyboardRow {
+ ShiftKey { }
+ }
+ }
+ }
+ KeyboardRow {
+ id: bottomRow
+ Layout.preferredHeight: 1
+ keyWeight: 154
+ Key {
+ weight: 217
+ key: Qt.Key_Mode_switch
+ noKeyEvent: true
+ functionKey: true
+ text: InputContext.inputEngine.inputMode === InputEngine.Latin ? "123" : "ABC"
+ onClicked: InputContext.inputEngine.inputMode = InputContext.inputEngine.inputMode === InputEngine.Latin ? InputEngine.Numeric : InputEngine.Latin
+ enabled: !(InputContext.inputMethodHints & (Qt.ImhDialableCharactersOnly | Qt.ImhFormattedNumbersOnly | Qt.ImhDigitsOnly))
+ keyPanelDelegate: keyboard.style ? keyboard.style.symbolKeyPanel : undefined
+ }
+ 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/fr_FR/main.qml b/src/virtualkeyboard/content/layouts/fr_FR/main.qml
index 73cefe32..3a82a44d 100644
--- a/src/virtualkeyboard/content/layouts/fr_FR/main.qml
+++ b/src/virtualkeyboard/content/layouts/fr_FR/main.qml
@@ -182,6 +182,9 @@ KeyboardLayout {
ChangeLanguageKey {
weight: 154
}
+ HandwritingModeKey {
+ weight: 154
+ }
SpaceKey {
weight: 864
}
diff --git a/src/virtualkeyboard/content/layouts/it_IT/handwriting.qml b/src/virtualkeyboard/content/layouts/it_IT/handwriting.qml
new file mode 100644
index 00000000..1a505e7e
--- /dev/null
+++ b/src/virtualkeyboard/content/layouts/it_IT/handwriting.qml
@@ -0,0 +1,96 @@
+/******************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Virtual Keyboard module.
+**
+** $QT_BEGIN_LICENSE:COMM$
+**
+** 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 http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** $QT_END_LICENSE$
+**
+******************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Layouts 1.0
+import QtQuick.Enterprise.VirtualKeyboard 2.0
+
+KeyboardLayout {
+ function createInputMethod() {
+ return Qt.createQmlObject('import QtQuick 2.0; import QtQuick.Enterprise.VirtualKeyboard 2.0; HandwritingInputMethod {}', parent)
+ }
+ sharedLayouts: ['symbols']
+ inputMode: InputEngine.Latin
+
+ KeyboardRow {
+ Layout.preferredHeight: 3
+ KeyboardColumn {
+ Layout.preferredWidth: bottomRow.width - hideKeyboardKey.width
+ KeyboardRow {
+ TraceInputKey {
+ objectName: "hwrInputArea"
+ patternRecognitionMode: InputEngine.HandwritingRecoginition
+ }
+ }
+ }
+ KeyboardColumn {
+ Layout.preferredWidth: hideKeyboardKey.width
+ KeyboardRow {
+ BackspaceKey {}
+ }
+ KeyboardRow {
+ EnterKey {}
+ }
+ KeyboardRow {
+ ShiftKey { }
+ }
+ }
+ }
+ KeyboardRow {
+ id: bottomRow
+ Layout.preferredHeight: 1
+ keyWeight: 154
+ Key {
+ weight: 217
+ key: Qt.Key_Mode_switch
+ noKeyEvent: true
+ functionKey: true
+ text: InputContext.inputEngine.inputMode === InputEngine.Latin ? "123" : "ABC"
+ onClicked: InputContext.inputEngine.inputMode = InputContext.inputEngine.inputMode === InputEngine.Latin ? InputEngine.Numeric : InputEngine.Latin
+ enabled: !(InputContext.inputMethodHints & (Qt.ImhDialableCharactersOnly | Qt.ImhFormattedNumbersOnly | Qt.ImhDigitsOnly))
+ keyPanelDelegate: keyboard.style ? keyboard.style.symbolKeyPanel : undefined
+ }
+ 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/it_IT/main.qml b/src/virtualkeyboard/content/layouts/it_IT/main.qml
index 4a54d47e..3ea87cc9 100644
--- a/src/virtualkeyboard/content/layouts/it_IT/main.qml
+++ b/src/virtualkeyboard/content/layouts/it_IT/main.qml
@@ -176,6 +176,9 @@ KeyboardLayout {
ChangeLanguageKey {
weight: 154
}
+ HandwritingModeKey {
+ weight: 154
+ }
SpaceKey {
weight: 864
}
diff --git a/src/virtualkeyboard/content/layouts/nb_NO/handwriting.qml b/src/virtualkeyboard/content/layouts/nb_NO/handwriting.qml
new file mode 100644
index 00000000..1a505e7e
--- /dev/null
+++ b/src/virtualkeyboard/content/layouts/nb_NO/handwriting.qml
@@ -0,0 +1,96 @@
+/******************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Virtual Keyboard module.
+**
+** $QT_BEGIN_LICENSE:COMM$
+**
+** 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 http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** $QT_END_LICENSE$
+**
+******************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Layouts 1.0
+import QtQuick.Enterprise.VirtualKeyboard 2.0
+
+KeyboardLayout {
+ function createInputMethod() {
+ return Qt.createQmlObject('import QtQuick 2.0; import QtQuick.Enterprise.VirtualKeyboard 2.0; HandwritingInputMethod {}', parent)
+ }
+ sharedLayouts: ['symbols']
+ inputMode: InputEngine.Latin
+
+ KeyboardRow {
+ Layout.preferredHeight: 3
+ KeyboardColumn {
+ Layout.preferredWidth: bottomRow.width - hideKeyboardKey.width
+ KeyboardRow {
+ TraceInputKey {
+ objectName: "hwrInputArea"
+ patternRecognitionMode: InputEngine.HandwritingRecoginition
+ }
+ }
+ }
+ KeyboardColumn {
+ Layout.preferredWidth: hideKeyboardKey.width
+ KeyboardRow {
+ BackspaceKey {}
+ }
+ KeyboardRow {
+ EnterKey {}
+ }
+ KeyboardRow {
+ ShiftKey { }
+ }
+ }
+ }
+ KeyboardRow {
+ id: bottomRow
+ Layout.preferredHeight: 1
+ keyWeight: 154
+ Key {
+ weight: 217
+ key: Qt.Key_Mode_switch
+ noKeyEvent: true
+ functionKey: true
+ text: InputContext.inputEngine.inputMode === InputEngine.Latin ? "123" : "ABC"
+ onClicked: InputContext.inputEngine.inputMode = InputContext.inputEngine.inputMode === InputEngine.Latin ? InputEngine.Numeric : InputEngine.Latin
+ enabled: !(InputContext.inputMethodHints & (Qt.ImhDialableCharactersOnly | Qt.ImhFormattedNumbersOnly | Qt.ImhDigitsOnly))
+ keyPanelDelegate: keyboard.style ? keyboard.style.symbolKeyPanel : undefined
+ }
+ 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/nb_NO/main.qml b/src/virtualkeyboard/content/layouts/nb_NO/main.qml
index e109db54..07a0d9c0 100644
--- a/src/virtualkeyboard/content/layouts/nb_NO/main.qml
+++ b/src/virtualkeyboard/content/layouts/nb_NO/main.qml
@@ -193,6 +193,9 @@ KeyboardLayout {
ChangeLanguageKey {
weight: 154
}
+ HandwritingModeKey {
+ weight: 154
+ }
SpaceKey {
weight: 864
}
diff --git a/src/virtualkeyboard/content/layouts/pl_PL/handwriting.qml b/src/virtualkeyboard/content/layouts/pl_PL/handwriting.qml
new file mode 100644
index 00000000..1a505e7e
--- /dev/null
+++ b/src/virtualkeyboard/content/layouts/pl_PL/handwriting.qml
@@ -0,0 +1,96 @@
+/******************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Virtual Keyboard module.
+**
+** $QT_BEGIN_LICENSE:COMM$
+**
+** 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 http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** $QT_END_LICENSE$
+**
+******************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Layouts 1.0
+import QtQuick.Enterprise.VirtualKeyboard 2.0
+
+KeyboardLayout {
+ function createInputMethod() {
+ return Qt.createQmlObject('import QtQuick 2.0; import QtQuick.Enterprise.VirtualKeyboard 2.0; HandwritingInputMethod {}', parent)
+ }
+ sharedLayouts: ['symbols']
+ inputMode: InputEngine.Latin
+
+ KeyboardRow {
+ Layout.preferredHeight: 3
+ KeyboardColumn {
+ Layout.preferredWidth: bottomRow.width - hideKeyboardKey.width
+ KeyboardRow {
+ TraceInputKey {
+ objectName: "hwrInputArea"
+ patternRecognitionMode: InputEngine.HandwritingRecoginition
+ }
+ }
+ }
+ KeyboardColumn {
+ Layout.preferredWidth: hideKeyboardKey.width
+ KeyboardRow {
+ BackspaceKey {}
+ }
+ KeyboardRow {
+ EnterKey {}
+ }
+ KeyboardRow {
+ ShiftKey { }
+ }
+ }
+ }
+ KeyboardRow {
+ id: bottomRow
+ Layout.preferredHeight: 1
+ keyWeight: 154
+ Key {
+ weight: 217
+ key: Qt.Key_Mode_switch
+ noKeyEvent: true
+ functionKey: true
+ text: InputContext.inputEngine.inputMode === InputEngine.Latin ? "123" : "ABC"
+ onClicked: InputContext.inputEngine.inputMode = InputContext.inputEngine.inputMode === InputEngine.Latin ? InputEngine.Numeric : InputEngine.Latin
+ enabled: !(InputContext.inputMethodHints & (Qt.ImhDialableCharactersOnly | Qt.ImhFormattedNumbersOnly | Qt.ImhDigitsOnly))
+ keyPanelDelegate: keyboard.style ? keyboard.style.symbolKeyPanel : undefined
+ }
+ 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/pl_PL/main.qml b/src/virtualkeyboard/content/layouts/pl_PL/main.qml
index 355d0e20..0610556f 100644
--- a/src/virtualkeyboard/content/layouts/pl_PL/main.qml
+++ b/src/virtualkeyboard/content/layouts/pl_PL/main.qml
@@ -180,6 +180,9 @@ KeyboardLayout {
ChangeLanguageKey {
weight: 154
}
+ HandwritingModeKey {
+ weight: 154
+ }
SpaceKey {
weight: 864
}
diff --git a/src/virtualkeyboard/content/layouts/pt_PT/handwriting.qml b/src/virtualkeyboard/content/layouts/pt_PT/handwriting.qml
new file mode 100644
index 00000000..1a505e7e
--- /dev/null
+++ b/src/virtualkeyboard/content/layouts/pt_PT/handwriting.qml
@@ -0,0 +1,96 @@
+/******************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Virtual Keyboard module.
+**
+** $QT_BEGIN_LICENSE:COMM$
+**
+** 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 http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** $QT_END_LICENSE$
+**
+******************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Layouts 1.0
+import QtQuick.Enterprise.VirtualKeyboard 2.0
+
+KeyboardLayout {
+ function createInputMethod() {
+ return Qt.createQmlObject('import QtQuick 2.0; import QtQuick.Enterprise.VirtualKeyboard 2.0; HandwritingInputMethod {}', parent)
+ }
+ sharedLayouts: ['symbols']
+ inputMode: InputEngine.Latin
+
+ KeyboardRow {
+ Layout.preferredHeight: 3
+ KeyboardColumn {
+ Layout.preferredWidth: bottomRow.width - hideKeyboardKey.width
+ KeyboardRow {
+ TraceInputKey {
+ objectName: "hwrInputArea"
+ patternRecognitionMode: InputEngine.HandwritingRecoginition
+ }
+ }
+ }
+ KeyboardColumn {
+ Layout.preferredWidth: hideKeyboardKey.width
+ KeyboardRow {
+ BackspaceKey {}
+ }
+ KeyboardRow {
+ EnterKey {}
+ }
+ KeyboardRow {
+ ShiftKey { }
+ }
+ }
+ }
+ KeyboardRow {
+ id: bottomRow
+ Layout.preferredHeight: 1
+ keyWeight: 154
+ Key {
+ weight: 217
+ key: Qt.Key_Mode_switch
+ noKeyEvent: true
+ functionKey: true
+ text: InputContext.inputEngine.inputMode === InputEngine.Latin ? "123" : "ABC"
+ onClicked: InputContext.inputEngine.inputMode = InputContext.inputEngine.inputMode === InputEngine.Latin ? InputEngine.Numeric : InputEngine.Latin
+ enabled: !(InputContext.inputMethodHints & (Qt.ImhDialableCharactersOnly | Qt.ImhFormattedNumbersOnly | Qt.ImhDigitsOnly))
+ keyPanelDelegate: keyboard.style ? keyboard.style.symbolKeyPanel : undefined
+ }
+ 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/pt_PT/main.qml b/src/virtualkeyboard/content/layouts/pt_PT/main.qml
index 1d6eab9f..7b835d44 100644
--- a/src/virtualkeyboard/content/layouts/pt_PT/main.qml
+++ b/src/virtualkeyboard/content/layouts/pt_PT/main.qml
@@ -185,6 +185,9 @@ KeyboardLayout {
ChangeLanguageKey {
weight: 154
}
+ HandwritingModeKey {
+ weight: 154
+ }
SpaceKey {
weight: 864
}
diff --git a/src/virtualkeyboard/content/layouts/ru_RU/handwriting.qml b/src/virtualkeyboard/content/layouts/ru_RU/handwriting.qml
new file mode 100644
index 00000000..1a505e7e
--- /dev/null
+++ b/src/virtualkeyboard/content/layouts/ru_RU/handwriting.qml
@@ -0,0 +1,96 @@
+/******************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Virtual Keyboard module.
+**
+** $QT_BEGIN_LICENSE:COMM$
+**
+** 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 http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** $QT_END_LICENSE$
+**
+******************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Layouts 1.0
+import QtQuick.Enterprise.VirtualKeyboard 2.0
+
+KeyboardLayout {
+ function createInputMethod() {
+ return Qt.createQmlObject('import QtQuick 2.0; import QtQuick.Enterprise.VirtualKeyboard 2.0; HandwritingInputMethod {}', parent)
+ }
+ sharedLayouts: ['symbols']
+ inputMode: InputEngine.Latin
+
+ KeyboardRow {
+ Layout.preferredHeight: 3
+ KeyboardColumn {
+ Layout.preferredWidth: bottomRow.width - hideKeyboardKey.width
+ KeyboardRow {
+ TraceInputKey {
+ objectName: "hwrInputArea"
+ patternRecognitionMode: InputEngine.HandwritingRecoginition
+ }
+ }
+ }
+ KeyboardColumn {
+ Layout.preferredWidth: hideKeyboardKey.width
+ KeyboardRow {
+ BackspaceKey {}
+ }
+ KeyboardRow {
+ EnterKey {}
+ }
+ KeyboardRow {
+ ShiftKey { }
+ }
+ }
+ }
+ KeyboardRow {
+ id: bottomRow
+ Layout.preferredHeight: 1
+ keyWeight: 154
+ Key {
+ weight: 217
+ key: Qt.Key_Mode_switch
+ noKeyEvent: true
+ functionKey: true
+ text: InputContext.inputEngine.inputMode === InputEngine.Latin ? "123" : "ABC"
+ onClicked: InputContext.inputEngine.inputMode = InputContext.inputEngine.inputMode === InputEngine.Latin ? InputEngine.Numeric : InputEngine.Latin
+ enabled: !(InputContext.inputMethodHints & (Qt.ImhDialableCharactersOnly | Qt.ImhFormattedNumbersOnly | Qt.ImhDigitsOnly))
+ keyPanelDelegate: keyboard.style ? keyboard.style.symbolKeyPanel : undefined
+ }
+ 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/ru_RU/main.qml b/src/virtualkeyboard/content/layouts/ru_RU/main.qml
index 58a96e9d..4fa27f62 100644
--- a/src/virtualkeyboard/content/layouts/ru_RU/main.qml
+++ b/src/virtualkeyboard/content/layouts/ru_RU/main.qml
@@ -191,6 +191,9 @@ KeyboardLayout {
ChangeLanguageKey {
weight: 154
}
+ HandwritingModeKey {
+ weight: 154
+ }
SpaceKey {
weight: 864
}
diff --git a/src/virtualkeyboard/content/layouts/sv_SE/handwriting.qml b/src/virtualkeyboard/content/layouts/sv_SE/handwriting.qml
new file mode 100644
index 00000000..1a505e7e
--- /dev/null
+++ b/src/virtualkeyboard/content/layouts/sv_SE/handwriting.qml
@@ -0,0 +1,96 @@
+/******************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Virtual Keyboard module.
+**
+** $QT_BEGIN_LICENSE:COMM$
+**
+** 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 http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** $QT_END_LICENSE$
+**
+******************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Layouts 1.0
+import QtQuick.Enterprise.VirtualKeyboard 2.0
+
+KeyboardLayout {
+ function createInputMethod() {
+ return Qt.createQmlObject('import QtQuick 2.0; import QtQuick.Enterprise.VirtualKeyboard 2.0; HandwritingInputMethod {}', parent)
+ }
+ sharedLayouts: ['symbols']
+ inputMode: InputEngine.Latin
+
+ KeyboardRow {
+ Layout.preferredHeight: 3
+ KeyboardColumn {
+ Layout.preferredWidth: bottomRow.width - hideKeyboardKey.width
+ KeyboardRow {
+ TraceInputKey {
+ objectName: "hwrInputArea"
+ patternRecognitionMode: InputEngine.HandwritingRecoginition
+ }
+ }
+ }
+ KeyboardColumn {
+ Layout.preferredWidth: hideKeyboardKey.width
+ KeyboardRow {
+ BackspaceKey {}
+ }
+ KeyboardRow {
+ EnterKey {}
+ }
+ KeyboardRow {
+ ShiftKey { }
+ }
+ }
+ }
+ KeyboardRow {
+ id: bottomRow
+ Layout.preferredHeight: 1
+ keyWeight: 154
+ Key {
+ weight: 217
+ key: Qt.Key_Mode_switch
+ noKeyEvent: true
+ functionKey: true
+ text: InputContext.inputEngine.inputMode === InputEngine.Latin ? "123" : "ABC"
+ onClicked: InputContext.inputEngine.inputMode = InputContext.inputEngine.inputMode === InputEngine.Latin ? InputEngine.Numeric : InputEngine.Latin
+ enabled: !(InputContext.inputMethodHints & (Qt.ImhDialableCharactersOnly | Qt.ImhFormattedNumbersOnly | Qt.ImhDigitsOnly))
+ keyPanelDelegate: keyboard.style ? keyboard.style.symbolKeyPanel : undefined
+ }
+ 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/sv_SE/main.qml b/src/virtualkeyboard/content/layouts/sv_SE/main.qml
index 53340766..39b56ae6 100644
--- a/src/virtualkeyboard/content/layouts/sv_SE/main.qml
+++ b/src/virtualkeyboard/content/layouts/sv_SE/main.qml
@@ -187,6 +187,9 @@ KeyboardLayout {
ChangeLanguageKey {
weight: 154
}
+ HandwritingModeKey {
+ weight: 154
+ }
SpaceKey {
weight: 864
}
diff --git a/src/virtualkeyboard/content/layouts/zh_TW/main.qml b/src/virtualkeyboard/content/layouts/zh_TW/main.qml
index e670c732..b16ef8fb 100644
--- a/src/virtualkeyboard/content/layouts/zh_TW/main.qml
+++ b/src/virtualkeyboard/content/layouts/zh_TW/main.qml
@@ -199,7 +199,8 @@ KeyboardLayoutLoader {
}
ModeKey {
visible: InputContext.inputEngine.inputModes.indexOf(InputEngine.Zhuyin) !== -1
- displayText: "\u6CE8\u97F3"
+ // Cangjie
+ displayText: "\u5009\u9821"
onClicked: InputContext.inputEngine.inputMode = InputEngine.Zhuyin
}
SpaceKey {
@@ -424,7 +425,8 @@ KeyboardLayoutLoader {
}
ModeKey {
visible: InputContext.inputEngine.inputModes.indexOf(InputEngine.Cangjie) !== -1
- displayText: "\u5009\u9821"
+ // Zhuyin
+ displayText: "\u6CE8\u97F3"
onClicked: InputContext.inputEngine.inputMode = InputEngine.Cangjie
}
SpaceKey {
diff --git a/src/virtualkeyboard/doc/src/technical-guide.qdoc b/src/virtualkeyboard/doc/src/technical-guide.qdoc
index b01def6f..6161bfaa 100644
--- a/src/virtualkeyboard/doc/src/technical-guide.qdoc
+++ b/src/virtualkeyboard/doc/src/technical-guide.qdoc
@@ -280,13 +280,35 @@ InputEngine::wordCandidateListModel property.
Since version 2.0 of the virtual keyboard, input methods can consume
touch input data from touch screens or other input devices.
+Handwriting recognition works on the same principle as handling of
+normal keyboard input, i.e. input data is collected by the keyboard layout
+and transferred by the input engine to the input method for further processing.
+
+In case of a regular keyboard, the amount of data transferred from the keyboard
+to input method is minimal (namely the keycode and text), but in the case of
+handwriting recognition the data volume is much bigger. Therefore, the touch
+input is stored in a particular data model.
+
+The input method does not participate in the actual collection of touch data.
+However, the input method has full control over touch input since it can
+either accept or reject touch. This allows for precise control over how many
+fingers can be used simultaneously.
+
+The input method can collect as many traces as it deems necessary and begin
+processing them at will. The processing can even be performed in parallel with
+the touch input, although it is not recommended because of the potential side
+effects. A recommended way is to start processing in a background thread
+after a suitable delay, so that it does not negatively affect the performance
+of the user interface.
+
\section2 Data Model for the Handwriting Input
The data collected from the input source is stored in an object named QtVirtualKeyboard::Trace (C++) or \l Trace (QML).
-By definition, a trace is a set of points collected from a single point of contact.
-In addition to point data, the trace may also include data from other channels,
-such as the time for each data point.
+By definition, \e trace is a set of data collected in one touch. In addition to
+the basic coordinate data, it can also include other types of data, such as
+the time of each data point. The input method can define the desired input channels
+at the beginning of a touch event.
\section2 Trace API for Input Methods
@@ -516,6 +538,25 @@ For example:
}
\endcode
+\section2 Handwriting Keyboard Layout
+
+Each language which supports handwriting recognition must provide a
+special keyboard layout named \e handwriting.qml.
+
+This type of keyboard layout must meet the following requirements:
+\list
+\li contains a TraceInputKey in the keyboard layout
+\li provides an instance of HandwritingInputMethod as the input method.
+\endlist
+
+The handwriting layout may also include ChangeLanguageKey. For this purpose, it is
+important to use the \l {ChangeLanguageKey::customLayoutsOnly} {customLayoutsOnly} attribute, which will filter out languages
+that do not use handwriting.
+
+Both the main and handwriting layouts should contain a key to activate
+and deactivate the handwriting input mode. This can be done by adding a
+HandwritingModeKey to the layout.
+
\section1 Keyboard Styles
The virtual keyboard styling system supports built-in styles as well
diff --git a/src/virtualkeyboard/t9writeinputmethod.cpp b/src/virtualkeyboard/t9writeinputmethod.cpp
index c3e9ce17..341b011d 100644
--- a/src/virtualkeyboard/t9writeinputmethod.cpp
+++ b/src/virtualkeyboard/t9writeinputmethod.cpp
@@ -296,7 +296,7 @@ public:
int isLanguageSupported = 0;
decumaDatabaseIsLanguageSupported(sessionSettings.pStaticDB, language, &isLanguageSupported);
- if (language == DECUMA_LANG_GSMDEFAULT) {
+ if (!isLanguageSupported) {
qWarning() << "Handwriting input does not support the language" << locale.name();
return false;
}
@@ -346,6 +346,9 @@ public:
symbolCategories.append(DECUMA_CATEGORY_BASIC_PUNCTUATIONS);
symbolCategories.append(DECUMA_CATEGORY_CONTRACTION_MARK);
}
+
+ if (language == DECUMA_LANG_ES)
+ symbolCategories.append(DECUMA_CATEGORY_SPANISH_PUNCTUATIONS);
}
break;
diff --git a/src/virtualkeyboard/virtualkeyboard.pro b/src/virtualkeyboard/virtualkeyboard.pro
index 515b1157..e0182777 100644
--- a/src/virtualkeyboard/virtualkeyboard.pro
+++ b/src/virtualkeyboard/virtualkeyboard.pro
@@ -81,16 +81,22 @@ contains(CONFIG, lang-da.*) {
LAYOUT_FILES += \
content/layouts/da_DK/main.qml \
content/layouts/da_DK/symbols.qml
+t9write: LAYOUT_FILES += \
+ content/layouts/da_DK/handwriting.qml
}
contains(CONFIG, lang-de.*) {
LAYOUT_FILES += \
content/layouts/de_DE/main.qml \
content/layouts/de_DE/symbols.qml
+t9write: LAYOUT_FILES += \
+ content/layouts/de_DE/handwriting.qml
}
contains(CONFIG, lang-es.*) {
LAYOUT_FILES += \
content/layouts/es_ES/main.qml \
content/layouts/es_ES/symbols.qml
+t9write: LAYOUT_FILES += \
+ content/layouts/es_ES/handwriting.qml
}
contains(CONFIG, lang-fa.*) {
LAYOUT_FILES += \
@@ -103,11 +109,15 @@ contains(CONFIG, lang-fi.*) {
LAYOUT_FILES += \
content/layouts/fi_FI/main.qml \
content/layouts/fi_FI/symbols.qml
+t9write: LAYOUT_FILES += \
+ content/layouts/fi_FI/handwriting.qml
}
contains(CONFIG, lang-fr.*) {
LAYOUT_FILES += \
content/layouts/fr_FR/main.qml \
content/layouts/fr_FR/symbols.qml
+t9write: LAYOUT_FILES += \
+ content/layouts/fr_FR/handwriting.qml
}
contains(CONFIG, lang-hi.*) {
LAYOUT_FILES += \
@@ -118,6 +128,8 @@ contains(CONFIG, lang-it.*) {
LAYOUT_FILES += \
content/layouts/it_IT/main.qml \
content/layouts/it_IT/symbols.qml
+t9write: LAYOUT_FILES += \
+ content/layouts/it_IT/handwriting.qml
}
contains(CONFIG, lang-ja.*) {
LAYOUT_FILES += \
@@ -133,26 +145,36 @@ contains(CONFIG, lang-nb.*) {
LAYOUT_FILES += \
content/layouts/nb_NO/main.qml \
content/layouts/nb_NO/symbols.qml
+t9write: LAYOUT_FILES += \
+ content/layouts/nb_NO/handwriting.qml
}
contains(CONFIG, lang-pl.*) {
LAYOUT_FILES += \
content/layouts/pl_PL/main.qml \
content/layouts/pl_PL/symbols.qml
+t9write: LAYOUT_FILES += \
+ content/layouts/pl_PL/handwriting.qml
}
contains(CONFIG, lang-pt.*) {
LAYOUT_FILES += \
content/layouts/pt_PT/main.qml \
content/layouts/pt_PT/symbols.qml
+t9write: LAYOUT_FILES += \
+ content/layouts/pt_PT/handwriting.qml
}
contains(CONFIG, lang-ru.*) {
LAYOUT_FILES += \
content/layouts/ru_RU/main.qml \
content/layouts/ru_RU/symbols.qml
+t9write: LAYOUT_FILES += \
+ content/layouts/ru_RU/handwriting.qml
}
contains(CONFIG, lang-sv.*) {
LAYOUT_FILES += \
content/layouts/sv_SE/main.qml \
content/layouts/sv_SE/symbols.qml
+t9write: LAYOUT_FILES += \
+ content/layouts/sv_SE/handwriting.qml
}
contains(CONFIG, lang-zh(_CN)?) {
LAYOUT_FILES += \
diff --git a/src/virtualkeyboard/virtualkeyboardsettings.cpp b/src/virtualkeyboard/virtualkeyboardsettings.cpp
index dcdf58fa..e5d74ba8 100644
--- a/src/virtualkeyboard/virtualkeyboardsettings.cpp
+++ b/src/virtualkeyboard/virtualkeyboardsettings.cpp
@@ -66,10 +66,17 @@ public:
{
QStringList styleImportPathList;
styleImportPathList << "qrc:/QtQuick/Enterprise/VirtualKeyboard/content/styles/";
- QStringList importPathList = engine->importPathList();
- // Add QML import path (Note: the QML base dir is always the last entry in the list)
- if (!importPathList.isEmpty())
- styleImportPathList << importPathList.last() + "/QtQuick/Enterprise/VirtualKeyboard/Styles/";
+ const QStringList importPathList = engine->importPathList();
+ // Add QML import path (Note: the QML base dir is usually the last entry in the list)
+ for (int i = importPathList.size() - 1; i >= 0; --i) {
+ const QString stylesPath = importPathList.at(i)
+ + QStringLiteral("/QtQuick/Enterprise/VirtualKeyboard/Styles/");
+ if (QFileInfo(stylesPath).isDir()) {
+ styleImportPathList += stylesPath;
+ break;
+ }
+ }
+
foreach (const QString &styleImportPath, styleImportPathList) {
QString filePath = buildStyleFilePath(styleImportPath, name);
bool pathExist = false;