Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap

Feedback on: irt.org FAQ Knowledge Base Q848, January 09, 2001 at 21:26:22:

You are here: irt.org | About | Feedback | 2222 [ previous next ]

Feedback on:
irt.org FAQ Knowledge Base Q848

Sent by
Trevor Hastings on January 09, 2001 at 21:26:22:

Not technical enough

Hi folks,

I love the irt knowledge base, but the answer for Q848 needs work.

Right now it says "In Netscape key presses are only captured when the cursor is within a text field."
That might have been true in some earlier version of Netscape, but all version 4, 5, and 6 browsers can capture key presses without any text field. (The catch is that the cursor can't be up in the "Location" box at the top of the screen.)

I'm including a script to show what I mean. I hope it helps!

- Trevor Hastings



<SCRIPT LANGUAGE="Javascript">

if (document.layers) {

document.onKeyPress = getKeyValue;

function getKeyValue(e){
if (document.all) {
var whichCode =
event.which ? event.which :
event.charCode ? event.charCode :
else {
var whichCode =
e.which ? e.which :
e.charCode ? e.charCode :
alert ("Key value is: " + whichCode)

<BODY onKeyPress="getKeyValue(event)">
This is a test. Hit any key to get its value.


Other feedback on 'irt.org FAQ Knowledge Base Q848' - show all

©2018 Martin Webb