author | kergoth <kergoth> | 2002-11-06 04:51:09 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-11-06 04:51:09 (UTC) |
commit | afc4a200ea476e4cb5baa52bac8e11c9efd398c2 (patch) (unidiff) | |
tree | 5c0c777674d0f4e974d057242a01d7867de245cb | |
parent | 21f27ec4a1f18321ac00d28d93cb1cb7dc957d1f (diff) | |
download | opie-afc4a200ea476e4cb5baa52bac8e11c9efd398c2.zip opie-afc4a200ea476e4cb5baa52bac8e11c9efd398c2.tar.gz opie-afc4a200ea476e4cb5baa52bac8e11c9efd398c2.tar.bz2 |
Unintentional commit
-rw-r--r-- | qt/qte233-for-opie091-keyboard.patch | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qt/qte233-for-opie091-keyboard.patch b/qt/qte233-for-opie091-keyboard.patch index c1b85b6..9d76a64 100644 --- a/qt/qte233-for-opie091-keyboard.patch +++ b/qt/qte233-for-opie091-keyboard.patch | |||
@@ -1,145 +1,145 @@ | |||
1 | --- src.orig/kernel/qkeyboard_qws.cppMon Mar 18 02:11:25 2002 | 1 | --- src.orig/kernel/qkeyboard_qws.cppMon Mar 18 02:11:25 2002 |
2 | +++ src/kernel/qkeyboard_qws.cppFri Aug 30 04:28:39 2002 | 2 | +++ src/kernel/qkeyboard_qws.cppFri Aug 30 04:28:39 2002 |
3 | @@ -269,7 +269,7 @@ | 3 | @@ -269,7 +269,7 @@ |
4 | { Qt::Key_O, 'o' , 'O' , 'O'-64 }, | 4 | { Qt::Key_O, 'o' , 'O' , 'O'-64 }, |
5 | { Qt::Key_P, 'p' , 'P' , 'P'-64 }, | 5 | { Qt::Key_P, 'p' , 'P' , 'P'-64 }, |
6 | { Qt::Key_BraceLeft, '[' , '{' , 0xffff }, | 6 | { Qt::Key_BraceLeft, '[' , '{' , 0xffff }, |
7 | - { Qt::Key_Escape, ']' , '}' , 0xffff }, | 7 | - { Qt::Key_Escape, ']' , '}' , 0xffff }, |
8 | + { Qt::Key_BraceRight, ']' , '}' , 0xffff }, | 8 | + { Qt::Key_BraceRight, ']' , '}' , 0xffff }, |
9 | { Qt::Key_Return, 13 , 13 , 0xffff }, | 9 | { Qt::Key_Return, 13 , 13 , 0xffff }, |
10 | { Qt::Key_Control, 0xffff , 0xffff , 0xffff }, | 10 | { Qt::Key_Control, 0xffff , 0xffff , 0xffff }, |
11 | { Qt::Key_A, 'a' , 'A' , 'A'-64 }, // 30 | 11 | { Qt::Key_A, 'a' , 'A' , 'A'-64 }, // 30 |
12 | @@ -394,7 +394,7 @@ | 12 | @@ -394,7 +394,7 @@ |
13 | bool numLock; | 13 | bool numLock; |
14 | #endif | 14 | #endif |
15 | bool caps; | 15 | bool caps; |
16 | - bool extended; | 16 | - bool extended; |
17 | + int extended; | 17 | + int extended; |
18 | int modifiers; | 18 | int modifiers; |
19 | int prevuni; | 19 | int prevuni; |
20 | int prevkey; | 20 | int prevkey; |
21 | @@ -524,7 +524,7 @@ | 21 | @@ -524,7 +524,7 @@ |
22 | shift = false; | 22 | shift = false; |
23 | alt = false; | 23 | alt = false; |
24 | ctrl = false; | 24 | ctrl = false; |
25 | - extended = false; | 25 | - extended = false; |
26 | + extended = 0; | 26 | + extended = 0; |
27 | prevuni = 0; | 27 | prevuni = 0; |
28 | prevkey = 0; | 28 | prevkey = 0; |
29 | caps = FALSE; | 29 | caps = FALSE; |
30 | @@ -561,10 +561,24 @@ | 30 | @@ -561,10 +561,24 @@ |
31 | int keyCode = Qt::Key_unknown; | 31 | int keyCode = Qt::Key_unknown; |
32 | bool release = false; | 32 | bool release = false; |
33 | int keypad = 0; | 33 | int keypad = 0; |
34 | +#if defined(QT_QWS_IPAQ) | 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 ! | 35 | + static int ipaq_return_pressed = false; // iPAQ Action Key has ScanCode 0x60: 0x60|0x80 = 0xe0 == extended mode 1 ! |
36 | +#endif | 36 | +#endif |
37 | + | 37 | + |
38 | #if !defined(QT_QWS_SHARP) | 38 | #if !defined(QT_QWS_CUSTOM) |
39 | - if (code == 224) { | 39 | - if (code == 224) { |
40 | + if ((code == 224) | 40 | + if ((code == 224) |
41 | +#if defined(QT_QWS_IPAQ) | 41 | +#if defined(QT_QWS_IPAQ) |
42 | + && !ipaq_return_pressed | 42 | + && !ipaq_return_pressed |
43 | +#endif | 43 | +#endif |
44 | + ) | 44 | + ) |
45 | + { | 45 | + { |
46 | // extended | 46 | // extended |
47 | -extended = true; | 47 | -extended = true; |
48 | +extended = 1; | 48 | +extended = 1; |
49 | +return; | 49 | +return; |
50 | + } | 50 | + } |
51 | + else if (code == 225) { | 51 | + else if (code == 225) { |
52 | + // extended 2 | 52 | + // extended 2 |
53 | + extended = 2; | 53 | + extended = 2; |
54 | return; | 54 | return; |
55 | } | 55 | } |
56 | #endif | 56 | #endif |
57 | @@ -574,7 +588,7 @@ | 57 | @@ -574,7 +588,7 @@ |
58 | code &= 0x7f; | 58 | code &= 0x7f; |
59 | } | 59 | } |
60 | 60 | ||
61 | - if (extended) { | 61 | - if (extended) { |
62 | + if (extended == 1) { | 62 | + if (extended == 1) { |
63 | switch (code) { | 63 | switch (code) { |
64 | case 72: | 64 | case 72: |
65 | keyCode = Qt::Key_Up; | 65 | keyCode = Qt::Key_Up; |
66 | @@ -612,6 +626,32 @@ | 66 | @@ -612,6 +626,32 @@ |
67 | case 53: | 67 | case 53: |
68 | keyCode = Qt::Key_Slash; | 68 | keyCode = Qt::Key_Slash; |
69 | break; | 69 | break; |
70 | +case 0x1d: | 70 | +case 0x1d: |
71 | + keyCode = Qt::Key_Control; | 71 | + keyCode = Qt::Key_Control; |
72 | + break; | 72 | + break; |
73 | +case 0x2a: | 73 | +case 0x2a: |
74 | + keyCode = Qt::Key_SysReq; | 74 | + keyCode = Qt::Key_SysReq; |
75 | + break; | 75 | + break; |
76 | +case 0x38: | 76 | +case 0x38: |
77 | + keyCode = Qt::Key_Alt; | 77 | + keyCode = Qt::Key_Alt; |
78 | + break; | 78 | + break; |
79 | +case 0x5b: | 79 | +case 0x5b: |
80 | + keyCode = Qt::Key_Super_L; | 80 | + keyCode = Qt::Key_Super_L; |
81 | + break; | 81 | + break; |
82 | +case 0x5c: | 82 | +case 0x5c: |
83 | + keyCode = Qt::Key_Super_R; | 83 | + keyCode = Qt::Key_Super_R; |
84 | + break; | 84 | + break; |
85 | +case 0x5d: | 85 | +case 0x5d: |
86 | + keyCode = Qt::Key_Menu; | 86 | + keyCode = Qt::Key_Menu; |
87 | + break; | 87 | + break; |
88 | +} | 88 | +} |
89 | + } else if (extended == 2) { | 89 | + } else if (extended == 2) { |
90 | +switch (code) { | 90 | +switch (code) { |
91 | +case 0x1d: | 91 | +case 0x1d: |
92 | + return; | 92 | + return; |
93 | +case 0x45: | 93 | +case 0x45: |
94 | + keyCode = Qt::Key_Pause; | 94 | + keyCode = Qt::Key_Pause; |
95 | + break; | 95 | + break; |
96 | } | 96 | } |
97 | } else { | 97 | } else { |
98 | #if defined(QT_QWS_SHARP) | 98 | #if defined(QT_QWS_CUSTOM) |
99 | @@ -650,6 +690,7 @@ | 99 | @@ -650,6 +690,7 @@ |
100 | repeatable = FALSE; | 100 | repeatable = FALSE; |
101 | break; | 101 | break; |
102 | case 0x60: | 102 | case 0x60: |
103 | + ipaq_return_pressed = !release; | 103 | + ipaq_return_pressed = !release; |
104 | keyCode = Key_Return; | 104 | keyCode = Key_Return; |
105 | break; | 105 | break; |
106 | case 0x67: | 106 | case 0x67: |
107 | @@ -687,13 +728,19 @@ | 107 | @@ -687,13 +728,19 @@ |
108 | else | 108 | else |
109 | repeater->stop(); | 109 | repeater->stop(); |
110 | #endif | 110 | #endif |
111 | + | 111 | + |
112 | +/* | 112 | +/* |
113 | + Translate shift+Key_Tab to Key_Backtab | 113 | + Translate shift+Key_Tab to Key_Backtab |
114 | +*/ | 114 | +*/ |
115 | +if (( keyCode == Key_Tab ) && shift ) | 115 | +if (( keyCode == Key_Tab ) && shift ) |
116 | + keyCode = Key_Backtab; | 116 | + keyCode = Key_Backtab; |
117 | } | 117 | } |
118 | 118 | ||
119 | /* | 119 | /* |
120 | Keypad consists of extended keys 53 and 28, | 120 | Keypad consists of extended keys 53 and 28, |
121 | and non-extended keys 55 and 71 through 83. | 121 | and non-extended keys 55 and 71 through 83. |
122 | */ | 122 | */ |
123 | - if ( extended ? (code == 53 || code == 28) : | 123 | - if ( extended ? (code == 53 || code == 28) : |
124 | + if ((extended == 1) ? (code == 53 || code == 28) : | 124 | + if ((extended == 1) ? (code == 53 || code == 28) : |
125 | (code == 55 || ( code >= 71 && code <= 83 )) ) | 125 | (code == 55 || ( code >= 71 && code <= 83 )) ) |
126 | keypad = Qt::Keypad; | 126 | keypad = Qt::Keypad; |
127 | 127 | ||
128 | @@ -803,7 +850,7 @@ | 128 | @@ -803,7 +850,7 @@ |
129 | unicode = QWSServer::keyMap()[code].shift_unicode ? QWSServer::keyMap()[code].shift_unicode : 0xffff; | 129 | unicode = QWSServer::keyMap()[code].shift_unicode ? QWSServer::keyMap()[code].shift_unicode : 0xffff; |
130 | else | 130 | else |
131 | unicode = QWSServer::keyMap()[code].unicode ? QWSServer::keyMap()[code].unicode : 0xffff; | 131 | unicode = QWSServer::keyMap()[code].unicode ? QWSServer::keyMap()[code].unicode : 0xffff; |
132 | - } else { | 132 | - } else { |
133 | + } else if (extended == 1) { | 133 | + } else if (extended == 1) { |
134 | if ( code == 53 ) | 134 | if ( code == 53 ) |
135 | unicode = '/'; | 135 | unicode = '/'; |
136 | } | 136 | } |
137 | @@ -829,7 +876,7 @@ | 137 | @@ -829,7 +876,7 @@ |
138 | prevkey = prevuni = 0; | 138 | prevkey = prevuni = 0; |
139 | } | 139 | } |
140 | } | 140 | } |
141 | - extended = false; | 141 | - extended = false; |
142 | + extended = 0; | 142 | + extended = 0; |
143 | } | 143 | } |
144 | 144 | ||
145 | 145 | ||