Determine the 'Overtype' mode using Javascript
<p>We are creating a web app to replace an old-school green-screen application. In the green-screen app, as the user presses the Insert key to switch between overtype and insert modes, the cursor changes to indicate which input mode the user is currently in. In IE (which is the official browser of the company), overtype mode also works, but there's no visual indication as to whether overtype mode is on or not, until the user starts typing and possibly over-writes existing information unexpectedly. I'd like to put some sort of visual indicator on the screen if in overtype mode.</p>

<p>How can you determine if the browser is in 'overtype mode' from Javascript?</p>

<p>Is there some property or function i can query to determine if the browser is in overtype mode? Even an IE-specific solution would be helpful, since our corporate policy dictates the browser to use as IE7 (pure torture, btw).</p>

<p><em>(I do know that one solution is to do check for key presses of the Insert key. However, it's a solution that I'd prefer to avoid since that method seems a bit flaky &amp; error-prone because I can't guarantee what mode the user would be in BEFORE he/she hits my page. )</em></p>

<p><strong>The reasoning behind this question:</strong></p>

<p>The functionality of this portion of the green-screen app is such that the user can select from a list of 'preformatted bodies of text'.</p>

<p><strong><em>crude eg.</em></strong></p>

<pre> 
 The excess for this policy is: $xxxxxx       and max limit is:$xxxxxx
 Date of policy is:             xx/xx/xxxx    and expires     : xx/xx/xxxx
 Some other irrelevant text
</pre>

<p>After selecting this 'preformatted text', the user would then use overtype to replace the x's with actual values, without disturbing the alignment of the rest of the text.</p>

<p><em>(To be clear, they can still edit any part of the 'preformatted text' if they so wished. It's just that usually, they just wish to replace specific portions of the text. Keeping the alignment is important since these sections of text can end up on printed documents.)</em></p>

<p>Of course, the same effect can be achieved by just selecting the x's to replace first, but it would be helpful <em>(with respect to easing the transition to the web app)</em> to allow old methods of doing things to continue to work, while still allowing 'web methods' to be used by the more tech-savvy users.</p>

<p>Essentially, we're trying to make the initial transition from the green-screen app to the web app be as seemless as possible to minimise the resistance from the long-time green-screeners.</p>
