aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cerence/xt9/plugin/9key_layouts/content/layouts/zh_CN/main.qml
blob: be10d434667aa41ba98d59c440e225b603bbc295 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

import QtQuick
import QtQuick.Layouts
import QtQuick.VirtualKeyboard
import QtQuick.VirtualKeyboard.Components

KeyboardLayout {
    function createInputMethod() {
        return Qt.createQmlObject('import QtQuick; import QtQuick.VirtualKeyboard.Plugins; PinyinInputMethod {}', parent, "main.qml")
    }
    sharedLayouts: ['symbols']
    smallTextVisible: true
    inputMode: InputEngine.InputMode.Pinyin
    KeyboardRow {
        Layout.fillWidth: false
        Layout.fillHeight: true
        Layout.alignment: Qt.AlignHCenter
        KeyboardColumn {
            Layout.fillWidth: false
            Layout.fillHeight: true
            Layout.preferredWidth: parent.height / 4 * 1
            Key {
                text: "~"
                alternativeKeys: "~『』「」()〔〕〈〉《》【】"
                highlighted: true
            }
            Key {
                text: "@"
                alternativeKeys: "@#$%^&*()=<>,.:;!?~"
                highlighted: true
            }
            FillerKey {}
            SymbolModeKey {}
        }
        KeyboardColumn {
            Layout.fillWidth: false
            Layout.fillHeight: true
            Layout.preferredWidth: parent.height / 30
            KeyboardRow {
                FillerKey {}
            }
        }
        KeyboardColumn {
            Layout.fillWidth: false
            Layout.fillHeight: true
            Layout.preferredWidth: parent.height / 4 * 3
            KeyboardRow {
                Key {
                    enabled: InputContext.preeditText.length > 0
                    key: Qt.Key_Apostrophe
                    text: "'"
                    displayText: "词"
                    smallText: "1"
                    alternativeKeys: "'1"
                }
                Key {
                    key: Qt.Key_2
                    text: "a"
                    displayText: "ABC"
                    smallText: "2"
                    alternativeKeys: "abc2"
                }
                Key {
                    key: Qt.Key_3
                    text: "d"
                    displayText: "DEF"
                    smallText: "3"
                    alternativeKeys: "def3"
                }
            }
            KeyboardRow {
                Key {
                    key: Qt.Key_4
                    text: "g"
                    displayText: "GHI"
                    smallText: "4"
                    alternativeKeys: "ghi4"
                }
                Key {
                    key: Qt.Key_5
                    text: "j"
                    displayText: "JKL"
                    smallText: "5"
                    alternativeKeys: "jkl5"
                }
                Key {
                    key: Qt.Key_6
                    text: "m"
                    displayText: "MNO"
                    smallText: "6"
                    alternativeKeys: "mno6"
                }
            }
            KeyboardRow {
                Key {
                    key: Qt.Key_7
                    text: "p"
                    displayText: "PQRS"
                    smallText: "7"
                    alternativeKeys: "pqrs7"
                }
                Key {
                    key: Qt.Key_8
                    text: "t"
                    displayText: "TUV"
                    smallText: "8"
                    alternativeKeys: "tuv8"
                }
                Key {
                    key: Qt.Key_9
                    text: "w"
                    displayText: "WXYZ"
                    smallText: "9"
                    alternativeKeys: "wxyz9"
                }
            }
            KeyboardRow {
                Key {
                    key: Qt.Key_Comma
                    text: "\u3001"
                    smallText: "\u2699"
                    smallTextVisible: keyboard.isFunctionPopupListAvailable()
                }
                Key {
                    key: Qt.Key_0
                    text: ","
                    alternativeKeys: ",;0"
                    smallText: "0"
                }
                Key {
                    text: "。"
                    alternativeKeys: "。?!:"
                }
            }
        }
        KeyboardColumn {
            Layout.fillWidth: false
            Layout.fillHeight: true
            Layout.preferredWidth: parent.height / 30
            KeyboardRow {
                FillerKey {}
            }
        }
        KeyboardColumn {
            Layout.fillWidth: false
            Layout.fillHeight: true
            Layout.preferredWidth: parent.height / 4 * 1
            BackspaceKey {}
            Key {
                text: "\u3000"
                displayText: "\u2423"
                repeat: true
                showPreview: false
                key: Qt.Key_Space
                highlighted: true
            }
            HideKeyboardKey {
                visible: true
            }
            EnterKey {}
        }
    }
}