Qt 4.8
qt-4.8.6
src
plugins
platforms
openkode
openkodekeytranslator.h
Go to the documentation of this file.
1
/****************************************************************************
2
**
3
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4
** Contact: http://www.qt-project.org/legal
5
**
6
** This file is part of the plugins of the Qt Toolkit.
7
**
8
** $QT_BEGIN_LICENSE:LGPL$
9
** Commercial License Usage
10
** Licensees holding valid commercial Qt licenses may use this file in
11
** accordance with the commercial license agreement provided with the
12
** Software or, alternatively, in accordance with the terms contained in
13
** a written agreement between you and Digia. For licensing terms and
14
** conditions see http://qt.digia.com/licensing. For further information
15
** use the contact form at http://qt.digia.com/contact-us.
16
**
17
** GNU Lesser General Public License Usage
18
** Alternatively, this file may be used under the terms of the GNU Lesser
19
** General Public License version 2.1 as published by the Free Software
20
** Foundation and appearing in the file LICENSE.LGPL included in the
21
** packaging of this file. Please review the following information to
22
** ensure the GNU Lesser General Public License version 2.1 requirements
23
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24
**
25
** In addition, as a special exception, Digia gives you certain additional
26
** rights. These rights are described in the Digia Qt LGPL Exception
27
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28
**
29
** GNU General Public License Usage
30
** Alternatively, this file may be used under the terms of the GNU
31
** General Public License version 3.0 as published by the Free Software
32
** Foundation and appearing in the file LICENSE.GPL included in the
33
** packaging of this file. Please review the following information to
34
** ensure the GNU General Public License version 3.0 requirements will be
35
** met: http://www.gnu.org/copyleft/gpl.html.
36
**
37
**
38
** $QT_END_LICENSE$
39
**
40
****************************************************************************/
41
42
#ifndef OPENKODEKEYTRANSLATOR_H
43
#define OPENKODEKEYTRANSLATOR_H
44
45
#ifdef KD_ATX_keyboard
46
47
#include <KD/ATX_keyboard.h>
48
49
QT_BEGIN_NAMESPACE
50
51
Qt::Key
keyTranslator
(
int
key
)
52
{
53
switch
(key) {
54
// KD_KEY_ACCEPT_ATX:
55
// KD_KEY_AGAIN_ATX:
56
// KD_KEY_ALLCANDIDATES_ATX
57
// KD_KEY_ALPHANUMERIC_ATX
58
case
KD_KEY_ALT_ATX:
59
return
Qt::Key_Alt
;
60
case
KD_KEY_ALTGRAPH_ATX:
61
return
Qt::Key_AltGr
;
62
// KD_KEY_APPS_ATX
63
// KD_KEY_ATTN_ATX
64
// KD_KEY_BROWSERBACK_ATX
65
// KD_KEY_BROWSERFAVORITES_ATX
66
// KD_KEY_BROWSERFORWARD_ATX
67
// KD_KEY_BROWSERHOME_ATX
68
// KD_KEY_BROWSERREFRESH_ATX
69
// KD_KEY_BROWSERSEARCH_ATX
70
// KD_KEY_BROWSERSTOP_ATX
71
case
KD_KEY_CAPSLOCK_ATX:
72
return
Qt::Key_CapsLock
;
73
case
KD_KEY_CLEAR_ATX:
74
return
Qt::Key_Clear
;
75
case
KD_KEY_CODEINPUT_ATX:
76
return
Qt::Key_Codeinput
;
77
// KD_KEY_COMPOSE_ATX
78
case
KD_KEY_CONTROL_ATX:
79
return
Qt::Key_Control
;
80
// KD_KEY_CRSEL_ATX
81
// KD_KEY_CONVERT_ATX
82
case
KD_KEY_COPY_ATX:
83
return
Qt::Key_Copy
;
84
case
KD_KEY_CUT_ATX:
85
return
Qt::Key_Cut
;
86
case
KD_KEY_DOWN_ATX:
87
return
Qt::Key_Down
;
88
case
KD_KEY_END_ATX:
89
return
Qt::Key_End
;
90
case
KD_KEY_ENTER_ATX:
91
return
Qt::Key_Enter
;
92
// KD_KEY_ERASEEOF_ATX
93
// KD_KEY_EXECUTE_ATX
94
// KD_KEY_EXSEL_ATX
95
case
KD_KEY_F1_ATX:
96
return
Qt::Key_F1
;
97
case
KD_KEY_F2_ATX:
98
return
Qt::Key_F2
;
99
case
KD_KEY_F3_ATX:
100
return
Qt::Key_F3
;
101
case
KD_KEY_F4_ATX:
102
return
Qt::Key_F4
;
103
case
KD_KEY_F5_ATX:
104
return
Qt::Key_F5
;
105
case
KD_KEY_F6_ATX:
106
return
Qt::Key_F6
;
107
case
KD_KEY_F7_ATX:
108
return
Qt::Key_F7
;
109
case
KD_KEY_F8_ATX:
110
return
Qt::Key_F8
;
111
case
KD_KEY_F9_ATX:
112
return
Qt::Key_F9
;
113
case
KD_KEY_F10_ATX:
114
return
Qt::Key_F10
;
115
case
KD_KEY_F11_ATX:
116
return
Qt::Key_F11
;
117
case
KD_KEY_F12_ATX:
118
return
Qt::Key_F12
;
119
case
KD_KEY_F13_ATX:
120
return
Qt::Key_F13
;
121
case
KD_KEY_F14_ATX:
122
return
Qt::Key_F14
;
123
case
KD_KEY_F15_ATX:
124
return
Qt::Key_F15
;
125
case
KD_KEY_F16_ATX:
126
return
Qt::Key_F16
;
127
case
KD_KEY_F17_ATX:
128
return
Qt::Key_F17
;
129
case
KD_KEY_F18_ATX:
130
return
Qt::Key_F18
;
131
case
KD_KEY_F19_ATX:
132
return
Qt::Key_F19
;
133
case
KD_KEY_F20_ATX:
134
return
Qt::Key_F20
;
135
case
KD_KEY_F21_ATX:
136
return
Qt::Key_F21
;
137
case
KD_KEY_F22_ATX:
138
return
Qt::Key_F22
;
139
case
KD_KEY_F23_ATX:
140
return
Qt::Key_F23
;
141
case
KD_KEY_F24_ATX:
142
return
Qt::Key_F24
;
143
// KD_KEY_FINALMODE_ATX
144
// KD_KEY_FIND_ATX
145
// KD_KEY_FULLWIDTH_ATX
146
// KD_KEY_HALFWIDTH_ATX
147
case
KD_KEY_HANGULMODE_ATX:
148
return
Qt::Key_Hangul
;
149
// KD_KEY_HANJAMODE_ATX
150
case
KD_KEY_HELP_ATX:
151
return
Qt::Key_Help
;
152
case
KD_KEY_HIRAGANA_ATX:
153
return
Qt::Key_Hiragana
;
154
case
KD_KEY_HOME_ATX:
155
return
Qt::Key_Home
;
156
case
KD_KEY_INSERT_ATX:
157
return
Qt::Key_Insert
;
158
// KD_KEY_JAPANESEHIRAGANA_ATX:
159
// KD_KEY_JAPANESEKATAKANA_ATX
160
// KD_KEY_JAPANESEROMAJI_ATX
161
// KD_KEY_JUNJAMODE_ATX
162
case
KD_KEY_KANAMODE_ATX:
163
return
Qt::Key_Kana_Lock
;
//?
164
case
KD_KEY_KANJIMODE_ATX:
165
return
Qt::Key_Kanji
;
166
// KD_KEY_KATAKANA_ATX
167
// KD_KEY_LAUNCHAPPLICATION1_ATX
168
// KD_KEY_LAUNCHAPPLICATION2_ATX
169
case
KD_KEY_LAUNCHMAIL_ATX:
170
return
Qt::Key_MailForward
;
171
case
KD_KEY_LEFT_ATX:
172
return
Qt::Key_Left
;
173
case
KD_KEY_META_ATX:
174
return
Qt::Key_Meta
;
175
case
KD_KEY_MEDIANEXTTRACK_ATX:
176
return
Qt::Key_MediaNext
;
177
case
KD_KEY_MEDIAPLAYPAUSE_ATX:
178
return
Qt::Key_MediaPause
;
179
case
KD_KEY_MEDIAPREVIOUSTRACK_ATX:
180
return
Qt::Key_MediaPrevious
;
181
case
KD_KEY_MEDIASTOP_ATX:
182
return
Qt::Key_MediaStop
;
183
case
KD_KEY_MODECHANGE_ATX:
184
return
Qt::Key_Mode_switch
;
185
// KD_KEY_NONCONVERT_ATX
186
case
KD_KEY_NUMLOCK_ATX:
187
return
Qt::Key_NumLock
;
188
case
KD_KEY_PAGEDOWN_ATX:
189
return
Qt::Key_PageDown
;
190
case
KD_KEY_PAGEUP_ATX:
191
return
Qt::Key_PageUp
;
192
case
KD_KEY_PASTE_ATX:
193
return
Qt::Key_Paste
;
194
case
KD_KEY_PAUSE_ATX:
195
return
Qt::Key_Pause
;
196
case
KD_KEY_PLAY_ATX:
197
return
Qt::Key_Play
;
198
// KD_KEY_PREVIOUSCANDIDATE_ATX
199
case
KD_KEY_PRINTSCREEN_ATX:
200
return
Qt::Key_Print
;
201
// case KD_KEY_PROCESS_ATX
202
// case KD_KEY_PROPS_ATX
203
case
KD_KEY_RIGHT_ATX:
204
return
Qt::Key_Right
;
205
// KD_KEY_ROMANCHARACTERS_ATX
206
case
KD_KEY_SCROLL_ATX:
207
return
Qt::Key_ScrollLock
;
208
case
KD_KEY_SELECT_ATX:
209
return
Qt::Key_Select
;
210
// KD_KEY_SELECTMEDIA_ATX
211
case
KD_KEY_SHIFT_ATX:
212
return
Qt::Key_Shift
;
213
case
KD_KEY_STOP_ATX:
214
return
Qt::Key_Stop
;
215
case
KD_KEY_UP_ATX:
216
return
Qt::Key_Up
;
217
// KD_KEY_UNDO_ATX
218
case
KD_KEY_VOLUMEDOWN_ATX:
219
return
Qt::Key_VolumeDown
;
220
case
KD_KEY_VOLUMEMUTE_ATX:
221
return
Qt::Key_VolumeMute
;
222
case
KD_KEY_VOLUMEUP_ATX:
223
return
Qt::Key_VolumeUp
;
224
case
KD_KEY_WIN_ATX:
225
return
Qt::Key_Meta
;
226
case
KD_KEY_ZOOM_ATX:
227
return
Qt::Key_Zoom
;
228
case
0x8:
229
return
Qt::Key_Backspace
;
230
case
0x1b:
231
return
Qt::Key_Escape
;
232
case
0x9:
233
return
Qt::Key_Tab
;
234
235
default
:
236
break
;
237
}
238
239
return
Qt::Key_Escape
;
240
}
241
242
QT_END_NAMESPACE
243
#endif //KD_ATX_keyboard
244
#endif // OPENKODEKEYTRANSLATOR_H
Qt::Key_F18
Definition:
qnamespace.h:669
Qt::Key_F23
Definition:
qnamespace.h:674
Qt::Key_VolumeUp
Definition:
qnamespace.h:955
Qt::Key_F20
Definition:
qnamespace.h:671
QT_END_NAMESPACE
#define QT_END_NAMESPACE
This macro expands to.
Definition:
qglobal.h:90
Qt::Key_F17
Definition:
qnamespace.h:668
Qt::Key_End
Definition:
qnamespace.h:632
Qt::Key_MediaNext
Definition:
qnamespace.h:967
Qt::Key_Meta
Definition:
qnamespace.h:647
Qt::Key_Control
Definition:
qnamespace.h:646
Qt::Key_F19
Definition:
qnamespace.h:670
Qt::Key_PageUp
Definition:
qnamespace.h:637
Qt::Key_Cut
Definition:
qnamespace.h:1024
Qt::Key_F9
Definition:
qnamespace.h:660
Qt::Key_F5
Definition:
qnamespace.h:656
Qt::Key_MediaPause
Definition:
qnamespace.h:969
Qt::Key_Kana_Lock
Definition:
qnamespace.h:897
Qt::Key_Escape
Definition:
qnamespace.h:613
Qt::Key_Enter
Definition:
qnamespace.h:624
Qt::Key_F24
Definition:
qnamespace.h:675
Qt::Key_Backspace
Definition:
qnamespace.h:619
Qt::Key_Right
Definition:
qnamespace.h:635
Qt::Key_Kanji
Definition:
qnamespace.h:884
Qt::Key_MediaStop
Definition:
qnamespace.h:962
Qt::Key_NumLock
Definition:
qnamespace.h:650
Qt::Key_F22
Definition:
qnamespace.h:673
Qt::Key_F4
Definition:
qnamespace.h:655
Qt::Key_MailForward
Definition:
qnamespace.h:1067
Qt::Key_AltGr
Definition:
qnamespace.h:872
Qt::Key_F6
Definition:
qnamespace.h:657
QT_BEGIN_NAMESPACE
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition:
qglobal.h:89
Qt::Key_F8
Definition:
qnamespace.h:659
Qt::Key_Down
Definition:
qnamespace.h:636
Qt::Key_Shift
Definition:
qnamespace.h:645
Qt::Key_F10
Definition:
qnamespace.h:661
Qt::Key_Hangul
Definition:
qnamespace.h:910
Qt::Key_F15
Definition:
qnamespace.h:666
Qt::Key_Help
Definition:
qnamespace.h:692
keyTranslator
Qt::Key keyTranslator(int key)
Definition:
qbbkeytranslator.h:50
Qt::Key_F14
Definition:
qnamespace.h:665
Qt::Key
Key
Definition:
qnamespace.h:612
Qt::Key_F7
Definition:
qnamespace.h:658
Qt::Key_ScrollLock
Definition:
qnamespace.h:651
Qt::Key_Zoom
Definition:
qnamespace.h:1103
Qt::Key_Codeinput
Definition:
qnamespace.h:874
Qt::Key_Paste
Definition:
qnamespace.h:1042
Qt::Key_Tab
Definition:
qnamespace.h:614
Qt::Key_F21
Definition:
qnamespace.h:672
Qt::Key_CapsLock
Definition:
qnamespace.h:649
Qt::Key_F12
Definition:
qnamespace.h:663
Qt::Key_Pause
Definition:
qnamespace.h:627
Qt::Key_Home
Definition:
qnamespace.h:631
Qt::Key_Copy
Definition:
qnamespace.h:1023
Qt::Key_PageDown
Definition:
qnamespace.h:641
Qt::Key_Up
Definition:
qnamespace.h:634
key
int key
Definition:
qkeysequence.cpp:395
Qt::Key_Select
Definition:
qnamespace.h:1093
Qt::Key_F3
Definition:
qnamespace.h:654
Qt::Key_Alt
Definition:
qnamespace.h:648
Qt::Key_MediaPrevious
Definition:
qnamespace.h:963
Qt::Key_F13
Definition:
qnamespace.h:664
Qt::Key_Clear
Definition:
qnamespace.h:630
Qt::Key_Insert
Definition:
qnamespace.h:625
Qt::Key_F1
Definition:
qnamespace.h:652
Qt::Key_Hiragana
Definition:
qnamespace.h:889
Qt::Key_Play
Definition:
qnamespace.h:1102
Qt::Key_Print
Definition:
qnamespace.h:628
Qt::Key_Mode_switch
Definition:
qnamespace.h:880
Qt::Key_VolumeDown
Definition:
qnamespace.h:953
Qt::Key_F16
Definition:
qnamespace.h:667
Qt::Key_F2
Definition:
qnamespace.h:653
Qt::Key_F11
Definition:
qnamespace.h:662
Qt::Key_VolumeMute
Definition:
qnamespace.h:954
Qt::Key_Left
Definition:
qnamespace.h:633
Qt::Key_Stop
Definition:
qnamespace.h:951
Qt 4.8 Source Code Browser