<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
I've tweaked my code beyond recognision but have found the following code:
<br><tt> var alt,ctrl,shft</tt>
<br><tt> if (is.ie){</tt>
<br><tt> alt = (e.altKey || e.altLeft)?true:false</tt>
<br><tt> ctrl = (e.ctrlKey ||
e.ctrlLeft)?true:false</tt>
<br><tt> shft = (e.shiftKey
|| e.shiftLeft)?true:false</tt>
<br><tt> }</tt>
<br><tt> if (is.ns){</tt>
<br><tt> var m = e.modifiers</tt>
<br><tt> alt = (m==1 || m==3
|| m==5 || m==7)?true:false</tt>
<br><tt> ctrl = (m==2 || m==3
|| m==6 || m==7)?true:false</tt>
<br><tt> shft = (m==4 || m==5
|| m==6 || m==7)?true:false</tt>
<br><tt> }</tt>
<br>Can be changed to the following:<tt></tt>
<p><tt> if (is.ie||is.ns5){</tt>
<br><tt> this.altKey
= (e.altKey || e.altLeft)</tt>
<br><tt> this.ctrlKey =
(e.ctrlKey || e.ctrlLeft)</tt>
<br><tt> this.shiftKey = (e.shiftKey
|| e.shiftLeft)</tt>
<br><tt> }</tt>
<br><tt> if (is.ns4){</tt>
<br><tt> var m = e.modifiers</tt>
<br><tt> this.altKey
= (m==1 || m==3 || m==5 || m==7)</tt>
<br><tt> this.ctrlKey =
(m==2 || m==3 || m==6 || m==7)</tt>
<br><tt> this.shiftKey = (m==4
|| m==5 || m==6 || m==7)</tt>
<br><tt> }</tt>
<p>It makes the code simpler and also adds support for NS6. Hope
this helps.
<br>--
<br>Michael Pemberton
<br>mp...@ph...
<br>ICQ: 12107010
<br> </html>
|