summaryrefslogtreecommitdiff
path: root/qt
authorsandman <sandman>2002-06-01 21:35:54 (UTC)
committer sandman <sandman>2002-06-01 21:35:54 (UTC)
commit4f5fdda25657f079b5937cbd4b588466c2298304 (patch) (unidiff)
tree43bb05ba0f831306b43c853aa76ced81f591effe /qt
parent508c023b2be72f82da5c2d41bc077238a279a206 (diff)
downloadopie-4f5fdda25657f079b5937cbd4b588466c2298304.zip
opie-4f5fdda25657f079b5937cbd4b588466c2298304.tar.gz
opie-4f5fdda25657f079b5937cbd4b588466c2298304.tar.bz2
Patch to src/kernel/qkeyboard_qws.cpp to:
a) support *all* PC/AT type scan codes (so micro keyboard should be fully functional b) Fix the sticky action key bug. (this is a problem with the action key scan code (0x60) and the key release flag (0x80). 0x60|0x80 = 0xe0 and this is the extended mode 1 modifier and not "release action key". Simple workaround: remember if action key is depressed.
Diffstat (limited to 'qt') (more/less context) (ignore whitespace changes)
-rw-r--r--qt/qte232-for-qpe150-keyboard.patch154
1 files changed, 154 insertions, 0 deletions
diff --git a/qt/qte232-for-qpe150-keyboard.patch b/qt/qte232-for-qpe150-keyboard.patch
new file mode 100644
index 0000000..5e212e9
--- a/dev/null
+++ b/qt/qte232-for-qpe150-keyboard.patch
@@ -0,0 +1,154 @@
1 --- src/kernel/qkeyboard_qws.cpp.origThu May 23 16:17:43 2002
2 +++ src/kernel/qkeyboard_qws.cppSat Jun 1 23:22:48 2002
3@@ -266,7 +266,7 @@
4 { Qt::Key_O, 'o' , 'O' , 'O'-64 },
5 { Qt::Key_P, 'p' , 'P' , 'P'-64 },
6 { Qt::Key_BraceLeft, '[' , '{' , 0xffff },
7- { Qt::Key_Escape, ']' , '}' , 0xffff },
8+ { Qt::Key_BraceRight, ']' , '}' , 0xffff },
9 { Qt::Key_Return, 13 , 13 , 0xffff },
10 { Qt::Key_Control, 0xffff , 0xffff , 0xffff },
11 { Qt::Key_A, 'a' , 'A' , 'A'-64 }, // 30
12@@ -391,7 +391,7 @@
13 bool numLock;
14 #endif
15 bool caps;
16- bool extended;
17+ int extended;
18 int modifiers;
19 int prevuni;
20 int prevkey;
21@@ -521,7 +521,7 @@
22 shift = false;
23 alt = false;
24 ctrl = false;
25- extended = false;
26+ extended = 0;
27 prevuni = 0;
28 prevkey = 0;
29 caps = FALSE;
30@@ -558,10 +558,24 @@
31 int keyCode = Qt::Key_unknown;
32 bool release = false;
33 int keypad = 0;
34+#if defined(QT_QWS_IPAQ)
35+ static int ipaq_return_pressed = false; // iPAQ Action Key has ScanCode 0x60: 0x60|0x80 = 0xe0 == extended mode 1 !
36+#endif
37+
38 #if !defined(QT_QWS_CUSTOM)
39- if (code == 224) {
40+ if ((code == 224)
41+#if defined(QT_QWS_IPAQ)
42+ && !ipaq_return_pressed
43+#endif
44+ )
45+ {
46 // extended
47 -extended = true;
48 +extended = 1;
49 +return;
50+ }
51+ else if (code == 225) {
52 + // extended 2
53 + extended = 2;
54 return;
55 }
56 #endif
57@@ -571,7 +585,7 @@
58 code &= 0x7f;
59 }
60
61- if (extended) {
62+ if (extended == 1) {
63 switch (code) {
64 case 72:
65 keyCode = Qt::Key_Up;
66@@ -609,6 +623,32 @@
67 case 53:
68 keyCode = Qt::Key_Slash;
69 break;
70 +case 0x1d:
71 + keyCode = Qt::Key_Control;
72 + break;
73 +case 0x2a:
74 + keyCode = Qt::Key_SysReq;
75 + break;
76 +case 0x38:
77 + keyCode = Qt::Key_Alt;
78 + break;
79 +case 0x5b:
80 + keyCode = Qt::Key_Super_L;
81 + break;
82 +case 0x5c:
83 + keyCode = Qt::Key_Super_R;
84 + break;
85 +case 0x5d:
86 + keyCode = Qt::Key_Menu;
87 + break;
88 +}
89+ } else if (extended == 2) {
90 +switch (code) {
91 +case 0x1d:
92 + return;
93 +case 0x45:
94 + keyCode = Qt::Key_Pause;
95 + break;
96 }
97 } else {
98 #if defined(QT_QWS_CUSTOM)
99@@ -647,6 +687,7 @@
100 repeatable = FALSE;
101 break;
102 case 0x60:
103 + ipaq_return_pressed = !release;
104 keyCode = Key_Return;
105 break;
106 case 0x67:
107@@ -684,13 +725,19 @@
108 else
109 repeater->stop();
110 #endif
111+
112 +/*
113 + Translate shift+Key_Tab to Key_Backtab
114 +*/
115 +if (( keyCode == Key_Tab ) && shift )
116 + keyCode = Key_Backtab;
117 }
118
119 /*
120 Keypad consists of extended keys 53 and 28,
121 and non-extended keys 55 and 71 through 83.
122 */
123- if ( extended ? (code == 53 || code == 28) :
124+ if ((extended == 1) ? (code == 53 || code == 28) :
125 (code == 55 || ( code >= 71 && code <= 83 )) )
126 keypad = Qt::Keypad;
127
128@@ -751,7 +798,7 @@
129 bool bShift = shift;
130 int unicode = 0;
131 if (code < keyMSize) {
132 - if (!extended) {
133 + if (extended == 0) {
134 bool bCaps = caps ^ shift;
135 #if defined(QT_QWS_CUSTOM)
136 if (fn) {
137@@ -790,7 +837,7 @@
138 unicode = QWSServer::keyMap()[code].shift_unicode ? QWSServer::keyMap()[code].shift_unicode : 0xffff;
139 else
140 unicode = QWSServer::keyMap()[code].unicode ? QWSServer::keyMap()[code].unicode : 0xffff;
141 - } else {
142 + } else if (extended == 1) {
143 if ( code == 53 )
144 unicode = '/';
145 }
146@@ -816,7 +863,7 @@
147 prevkey = prevuni = 0;
148 }
149 }
150- extended = false;
151+ extended = 0;
152 }
153
154