Dateianhang 'keycode.patch'
Herunterladen 1 ? keycode.patch
2 Index: docs/help.html
3 ===================================================================
4 RCS file: /data/cvs/cgiirc/docs/help.html,v
5 retrieving revision 1.4
6 diff -u -p -u -r1.4 help.html
7 --- docs/help.html 15 Jun 2002 21:35:16 -0000 1.4
8 +++ docs/help.html 21 Aug 2003 20:05:33 -0000
9 @@ -37,10 +37,15 @@ The options window lets you change some
10 immediately.
11
12 <h3>Keyboard shortcuts</h3>
13 -There are several shortcuts to help make using CGI:IRC nicer, tab completion
14 - which will complete a nickname or channel when you press tab, alt+number will
15 - go to that number window if you number the windows from the left (Status = 1
16 - and so on).
17 +There are several shortcuts to help make using CGI:IRC nicer.
18 +<table>
19 +<tr><td>Tab</td><td>Will autocomplete a nickname or channel.</td></tr>
20 +<tr><td>Ctrl+number / Alt+number</td><td>Will go to that number window if you number
21 + the windows from the left (Status = 1 and so on).</td></tr>
22 +<tr><td>Ctrl+B / Ctrl+Alt+B / Ctrl+Shift+B / Ctrl+Alt+Shift+B</td><td>Write "%B" for bold text.</td></tr>
23 +<tr><td>Ctrl+C / Ctrl+Alt+C / Ctrl+Shift+C / Ctrl+Alt+Shift+C</td><td>Write "%C" for colored text.</td></tr>
24 +<tr><td>Cursor Up/Down</td><td>Move in the command history.</td></tr>
25 +</table>
26
27 <h3>About CGI:IRC</h3>
28 CGI:IRC is written in Perl by David Leadbeater with help from lots of people. See the <a
29 Index: interfaces/ie.pm
30 ===================================================================
31 RCS file: /data/cvs/cgiirc/interfaces/ie.pm,v
32 retrieving revision 1.59
33 diff -u -p -u -r1.59 ie.pm
34 --- interfaces/ie.pm 18 Jan 2003 00:12:23 -0000 1.59
35 +++ interfaces/ie.pm 21 Aug 2003 20:05:34 -0000
36 @@ -587,10 +587,15 @@ The options window lets you change some
37 immediately.
38
39 <h3>Keyboard shortcuts</h3>
40 -There are several shortcuts to help make using CGI:IRC nicer, tab completion
41 - which will complete a nickname or channel when you press tab, alt+number will
42 - go to that number window if you number the windows from the left (Status = 1
43 - and so on).
44 +There are several shortcuts to help make using CGI:IRC nicer.
45 +<table>
46 +<tr><td>Tab</td><td>Will autocomplete a nickname or channel.</td></tr>
47 +<tr><td>Ctrl+number / Alt+number</td><td>Will go to that number window if you number
48 + the windows from the left (Status = 1 and so on).</td></tr>
49 +<tr><td>Ctrl+B / Ctrl+Alt+B / Ctrl+Shift+B / Ctrl+Alt+Shift+B</td><td>Write "%B" for bold text.</td></tr>
50 +<tr><td>Ctrl+C / Ctrl+Alt+C / Ctrl+Shift+C / Ctrl+Alt+Shift+C</td><td>Write "%C" for colored text.</td></tr>
51 +<tr><td>Cursor Up/Down</td><td>Move in the command history.</td></tr>
52 +</table>
53
54 <h3>About CGI:IRC</h3>
55 CGI:IRC is written in Perl by David Leadbeater with help from lots of people. See the <a
56 @@ -1314,21 +1319,32 @@ function hisdo() {
57 }
58
59 function enter_key_trap(e) {
60 - if(e == null) {
61 - return keypress(event.srcElement, event.keyCode, event);
62 - }else{
63 - // mozilla dodginess
64 - return keypress(e.target, e.keyCode == 0 ? e.which : e.keyCode, e);
65 + if(e == null) { // MSIE
66 + return keypress(event.srcElement, event);
67 + }else{ // Mozilla, Netscape, W3C
68 + return keypress(e.target, e);
69 }
70 }
71
72 -function keypress(srcEl, keyCode, event) {
73 +function keypress(srcEl, event) {
74 if (srcEl.tagName != 'INPUT' || srcEl.name.toLowerCase() != 'say')
75 return true;
76 -
77 - if(keyCode == 66 && event.ctrlKey) {
78 - append('\%B');
79 - }else if(keyCode == 67 && event.ctrlKey) {
80 + var charCode = event.charCode; // MSIE: undef, Mozilla: different when shifted
81 + var keyCode = event.keyCode; // the only one in MSIE, Mozilla: only special keys (up, down, etc)
82 + var which = event.which; // the only one in NN
83 +
84 + if(keyCode == null) { // NN
85 + charCode = which;
86 + if(which < 32) keyCode = which;
87 + // NN only has charcodes (and some special keys below 32, i.e. Esc)
88 + }
89 + if(charCode == null) charCode = keyCode; // MSIE
90 +
91 + if((charCode == 66 || charCode == 98) && event.ctrlKey) {
92 + // Ctrl + b(or B) is often bound to browser functions, Ctrl+Alt works in such cases
93 + append('\%B');
94 + }else if((charCode == 67 || charCode == 99) && event.ctrlKey) {
95 + // Ctrl + c(or C) is mostly bound to system/browser functions, use Ctrl+Alt then
96 append('\%C');
97 }else if(keyCode == 9) { // TAB
98 var tabIndex = srcEl.value.lastIndexOf(' ');
99 @@ -1368,14 +1384,14 @@ function keypress(srcEl, keyCode, event)
100 tabpos = (tabIndex == -1 ? 0 : tabIndex + 1) + tablen;
101 tabinc = 1;
102 }
103 - }else if(keyCode == 38) { // UP
104 + }else if(keyCode == 38) { // UP, doesn't work in NN
105 if(!shistory[hispos]) {
106 if(document.myform["say"].value) hisadd();
107 hispos = shistory.length;
108 }
109 hispos--;
110 hisdo();
111 - }else if(keyCode == 40) { // DOWN
112 + }else if(keyCode == 40) { // DOWN, dito
113 if(!shistory[hispos]) {
114 if(document.myform["say"].value) hisadd();
115 document.myform["say"].value = '';
116 @@ -1383,8 +1399,10 @@ function keypress(srcEl, keyCode, event)
117 }
118 hispos++;
119 hisdo();
120 - }else if(event.altKey && !event.ctrlKey && keyCode > 47 && keyCode < 58) {
121 - var num = keyCode - 48;
122 + }else if((event.altKey || event.ctrlKey) && charCode > 47 && charCode < 58) {
123 + // Alt or Ctrl + number is often bind to browser functions
124 + // so use any of the combinations browser passes through to event handler
125 + var num = charCode - 48;
126 if(num == 0) num = 10;
127
128 var name = parent.fwindowlist.witemchgnum(num);
129 Index: interfaces/konqueror.pm
130 ===================================================================
131 RCS file: /data/cvs/cgiirc/interfaces/konqueror.pm,v
132 retrieving revision 1.18
133 diff -u -p -u -r1.18 konqueror.pm
134 --- interfaces/konqueror.pm 18 Jan 2003 00:12:24 -0000 1.18
135 +++ interfaces/konqueror.pm 21 Aug 2003 20:05:35 -0000
136 @@ -348,10 +348,15 @@ The options window lets you change some
137 immediately.
138
139 <h3>Keyboard shortcuts</h3>
140 -There are several shortcuts to help make using CGI:IRC nicer, tab completion
141 - which will complete a nickname or channel when you press tab, alt+number will
142 - go to that number window if you number the windows from the left (Status = 1
143 - and so on).
144 +There are several shortcuts to help make using CGI:IRC nicer.
145 +<table>
146 +<tr><td>Tab</td><td>Will autocomplete a nickname or channel.</td></tr>
147 +<tr><td>Ctrl+number / Alt+number</td><td>Will go to that number window if you number
148 + the windows from the left (Status = 1 and so on).</td></tr>
149 +<tr><td>Ctrl+B / Ctrl+Alt+B / Ctrl+Shift+B / Ctrl+Alt+Shift+B</td><td>Write "%B" for bold text.</td></tr>
150 +<tr><td>Ctrl+C / Ctrl+Alt+C / Ctrl+Shift+C / Ctrl+Alt+Shift+C</td><td>Write "%C" for colored text.</td></tr>
151 +<tr><td>Cursor Up/Down</td><td>Move in the command history.</td></tr>
152 +</table>
153
154 <h3>About CGI:IRC</h3>
155 CGI:IRC is written in Perl by David Leadbeater with help from lots of people. See the <a
156 @@ -1061,21 +1066,32 @@ function hisdo() {
157 }
158
159 function enter_key_trap(e) {
160 - if(e == null) {
161 - return keypress(event.srcElement, event.keyCode, event);
162 - }else{
163 - // mozilla dodginess
164 - return keypress(e.target, e.keyCode == 0 ? e.which : e.keyCode, e);
165 + if(e == null) { // MSIE
166 + return keypress(event.srcElement, event);
167 + }else{ // Mozilla, Netscape, W3C
168 + return keypress(e.target, e);
169 }
170 }
171
172 -function keypress(srcEl, keyCode, event) {
173 +function keypress(srcEl, event) {
174 if (srcEl.tagName != 'INPUT' || srcEl.name.toLowerCase() != 'say')
175 return true;
176 -
177 - if(keyCode == 66 && event.ctrlKey) {
178 - append('\%B');
179 - }else if(keyCode == 67 && event.ctrlKey) {
180 + var charCode = event.charCode; // MSIE: undef, Mozilla: different when shifted
181 + var keyCode = event.keyCode; // the only one in MSIE, Mozilla: only special keys (up, down, etc)
182 + var which = event.which; // the only one in NN
183 +
184 + if(keyCode == null) { // NN
185 + charCode = which;
186 + if(which < 32) keyCode = which;
187 + // NN only has charcodes (and some special keys below 32, i.e. Esc)
188 + }
189 + if(charCode == null) charCode = keyCode; // MSIE
190 +
191 + if((charCode == 66 || charCode == 98) && event.ctrlKey) {
192 + // Ctrl + b(or B) is often bound to browser functions, Ctrl+Alt works in such cases
193 + append('\%B');
194 + }else if((charCode == 67 || charCode == 99) && event.ctrlKey) {
195 + // Ctrl + c(or C) is mostly bound to system/browser functions, use Ctrl+Alt then
196 append('\%C');
197 }else if(keyCode == 9) { // TAB
198 var tabIndex = srcEl.value.lastIndexOf(' ');
199 @@ -1115,14 +1131,14 @@ function keypress(srcEl, keyCode, event)
200 tabpos = (tabIndex == -1 ? 0 : tabIndex + 1) + tablen;
201 tabinc = 1;
202 }
203 - }else if(keyCode == 38) { // UP
204 + }else if(keyCode == 38) { // UP, doesn't work in NN
205 if(!shistory[hispos]) {
206 if(document.myform["say"].value) hisadd();
207 hispos = shistory.length;
208 }
209 hispos--;
210 hisdo();
211 - }else if(keyCode == 40) { // DOWN
212 + }else if(keyCode == 40) { // DOWN, dito
213 if(!shistory[hispos]) {
214 if(document.myform["say"].value) hisadd();
215 document.myform["say"].value = '';
216 @@ -1130,8 +1146,10 @@ function keypress(srcEl, keyCode, event)
217 }
218 hispos++;
219 hisdo();
220 - }else if(event.altKey && !event.ctrlKey && keyCode > 47 && keyCode < 58) {
221 - var num = keyCode - 48;
222 + }else if((event.altKey || event.ctrlKey) && charCode > 47 && charCode < 58) {
223 + // Alt or Ctrl + number is often bind to browser functions
224 + // so use any of the combinations browser passes through to event handler
225 + var num = charCode - 48;
226 if(num == 0) num = 10;
227
228 var name = parent.fwindowlist.witemchgnum(num);
229 Index: interfaces/mozilla.pm
230 ===================================================================
231 RCS file: /data/cvs/cgiirc/interfaces/mozilla.pm,v
232 retrieving revision 1.58
233 diff -u -p -u -r1.58 mozilla.pm
234 --- interfaces/mozilla.pm 18 Jan 2003 00:12:24 -0000 1.58
235 +++ interfaces/mozilla.pm 21 Aug 2003 20:05:36 -0000
236 @@ -334,10 +334,15 @@ The options window lets you change some
237 immediately.
238
239 <h3>Keyboard shortcuts</h3>
240 -There are several shortcuts to help make using CGI:IRC nicer, tab completion
241 - which will complete a nickname or channel when you press tab, alt+number will
242 - go to that number window if you number the windows from the left (Status = 1
243 - and so on).
244 +There are several shortcuts to help make using CGI:IRC nicer.
245 +<table>
246 +<tr><td>Tab</td><td>Will autocomplete a nickname or channel.</td></tr>
247 +<tr><td>Ctrl+number / Alt+number</td><td>Will go to that number window if you number
248 + the windows from the left (Status = 1 and so on).</td></tr>
249 +<tr><td>Ctrl+B / Ctrl+Alt+B / Ctrl+Shift+B / Ctrl+Alt+Shift+B</td><td>Write "%B" for bold text.</td></tr>
250 +<tr><td>Ctrl+C / Ctrl+Alt+C / Ctrl+Shift+C / Ctrl+Alt+Shift+C</td><td>Write "%C" for colored text.</td></tr>
251 +<tr><td>Cursor Up/Down</td><td>Move in the command history.</td></tr>
252 +</table>
253
254 <h3>About CGI:IRC</h3>
255 CGI:IRC is written in Perl by David Leadbeater with help from lots of people. See the <a
256 @@ -1047,21 +1052,32 @@ function hisdo() {
257 }
258
259 function enter_key_trap(e) {
260 - if(e == null) {
261 - return keypress(event.srcElement, event.keyCode, event);
262 - }else{
263 - // mozilla dodginess
264 - return keypress(e.target, e.keyCode == 0 ? e.which : e.keyCode, e);
265 + if(e == null) { // MSIE
266 + return keypress(event.srcElement, event);
267 + }else{ // Mozilla, Netscape, W3C
268 + return keypress(e.target, e);
269 }
270 }
271
272 -function keypress(srcEl, keyCode, event) {
273 +function keypress(srcEl, event) {
274 if (srcEl.tagName != 'INPUT' || srcEl.name.toLowerCase() != 'say')
275 return true;
276 -
277 - if(keyCode == 66 && event.ctrlKey) {
278 - append('\%B');
279 - }else if(keyCode == 67 && event.ctrlKey) {
280 + var charCode = event.charCode; // MSIE: undef, Mozilla: different when shifted
281 + var keyCode = event.keyCode; // the only one in MSIE, Mozilla: only special keys (up, down, etc)
282 + var which = event.which; // the only one in NN
283 +
284 + if(keyCode == null) { // NN
285 + charCode = which;
286 + if(which < 32) keyCode = which;
287 + // NN only has charcodes (and some special keys below 32, i.e. Esc)
288 + }
289 + if(charCode == null) charCode = keyCode; // MSIE
290 +
291 + if((charCode == 66 || charCode == 98) && event.ctrlKey) {
292 + // Ctrl + b(or B) is often bound to browser functions, Ctrl+Alt works in such cases
293 + append('\%B');
294 + }else if((charCode == 67 || charCode == 99) && event.ctrlKey) {
295 + // Ctrl + c(or C) is mostly bound to system/browser functions, use Ctrl+Alt then
296 append('\%C');
297 }else if(keyCode == 9) { // TAB
298 var tabIndex = srcEl.value.lastIndexOf(' ');
299 @@ -1101,14 +1117,14 @@ function keypress(srcEl, keyCode, event)
300 tabpos = (tabIndex == -1 ? 0 : tabIndex + 1) + tablen;
301 tabinc = 1;
302 }
303 - }else if(keyCode == 38) { // UP
304 + }else if(keyCode == 38) { // UP, doesn't work in NN
305 if(!shistory[hispos]) {
306 if(document.myform["say"].value) hisadd();
307 hispos = shistory.length;
308 }
309 hispos--;
310 hisdo();
311 - }else if(keyCode == 40) { // DOWN
312 + }else if(keyCode == 40) { // DOWN, dito
313 if(!shistory[hispos]) {
314 if(document.myform["say"].value) hisadd();
315 document.myform["say"].value = '';
316 @@ -1116,8 +1132,10 @@ function keypress(srcEl, keyCode, event)
317 }
318 hispos++;
319 hisdo();
320 - }else if(event.altKey && !event.ctrlKey && keyCode > 47 && keyCode < 58) {
321 - var num = keyCode - 48;
322 + }else if((event.altKey || event.ctrlKey) && charCode > 47 && charCode < 58) {
323 + // Alt or Ctrl + number is often bind to browser functions
324 + // so use any of the combinations browser passes through to event handler
325 + var num = charCode - 48;
326 if(num == 0) num = 10;
327
328 var name = parent.fwindowlist.witemchgnum(num);
329 Index: interfaces/interface-make/fform.pm
330 ===================================================================
331 RCS file: /data/cvs/cgiirc/interfaces/interface-make/fform.pm,v
332 retrieving revision 1.4
333 diff -u -p -u -r1.4 fform.pm
334 --- interfaces/interface-make/fform.pm 24 Nov 2002 19:02:06 -0000 1.4
335 +++ interfaces/interface-make/fform.pm 21 Aug 2003 20:05:36 -0000
336 @@ -74,21 +74,32 @@ function hisdo() {
337 }
338
339 function enter_key_trap(e) {
340 - if(e == null) {
341 - return keypress(event.srcElement, event.keyCode, event);
342 - }else{
343 - // mozilla dodginess
344 - return keypress(e.target, e.keyCode == 0 ? e.which : e.keyCode, e);
345 + if(e == null) { // MSIE
346 + return keypress(event.srcElement, event);
347 + }else{ // Mozilla, Netscape, W3C
348 + return keypress(e.target, e);
349 }
350 }
351
352 -function keypress(srcEl, keyCode, event) {
353 +function keypress(srcEl, event) {
354 if (srcEl.tagName != 'INPUT' || srcEl.name.toLowerCase() != 'say')
355 return true;
356 + var charCode = event.charCode; // MSIE: undef, Mozilla: different when shifted
357 + var keyCode = event.keyCode; // the only one in MSIE, Mozilla: only special keys (up, down, etc)
358 + var which = event.which; // the only one in NN
359
360 - if(keyCode == 66 && event.ctrlKey) {
361 - append('\%B');
362 - }else if(keyCode == 67 && event.ctrlKey) {
363 + if(keyCode == null) { // NN
364 + charCode = which;
365 + if(which < 32) keyCode = which;
366 + // NN only has charcodes (and some special keys below 32, i.e. Esc)
367 + }
368 + if(charCode == null) charCode = keyCode; // MSIE
369 +
370 + if((charCode == 66 || charCode == 98) && event.ctrlKey) {
371 + // Ctrl + b(or B) is often bound to browser functions, Ctrl+Alt works in such cases
372 + append('\%B');
373 + }else if((charCode == 67 || charCode == 99) && event.ctrlKey) {
374 + // Ctrl + c(or C) is mostly bound to system/browser functions, use Ctrl+Alt then
375 append('\%C');
376 }else if(keyCode == 9) { // TAB
377 var tabIndex = srcEl.value.lastIndexOf(' ');
378 @@ -128,14 +139,14 @@ function keypress(srcEl, keyCode, event)
379 tabpos = (tabIndex == -1 ? 0 : tabIndex + 1) + tablen;
380 tabinc = 1;
381 }
382 - }else if(keyCode == 38) { // UP
383 + }else if(keyCode == 38) { // UP, doesn't work in NN
384 if(!shistory[hispos]) {
385 if(document.myform["say"].value) hisadd();
386 hispos = shistory.length;
387 }
388 hispos--;
389 hisdo();
390 - }else if(keyCode == 40) { // DOWN
391 + }else if(keyCode == 40) { // DOWN, dito
392 if(!shistory[hispos]) {
393 if(document.myform["say"].value) hisadd();
394 document.myform["say"].value = '';
395 @@ -143,8 +154,10 @@ function keypress(srcEl, keyCode, event)
396 }
397 hispos++;
398 hisdo();
399 - }else if(event.altKey && !event.ctrlKey && keyCode > 47 && keyCode < 58) {
400 - var num = keyCode - 48;
401 + }else if((event.altKey || event.ctrlKey) && charCode > 47 && charCode < 58) {
402 + // Alt or Ctrl + number is often bind to browser functions
403 + // so use any of the combinations browser passes through to event handler
404 + var num = charCode - 48;
405 if(num == 0) num = 10;
406
407 var name = parent.fwindowlist.witemchgnum(num);
Gespeicherte Dateianhänge
Um Dateianhänge in eine Seite einzufügen sollte unbedingt eine Angabe wie attachment:dateiname benutzt werden, wie sie auch in der folgenden Liste der Dateien erscheint. Es sollte niemals die URL des Verweises ("laden") kopiert werden, da sich diese jederzeit ändern kann und damit der Verweis auf die Datei brechen würde.Sie dürfen keine Anhänge an diese Seite anhängen!