Hey Troy,

Hopefully the browser will be NS or IE compliant, if so you can make set it
up to capture key events and alert() them so you can atleast know the
"value" of the key pressed.

id put this in my <head> to capture the value of the keys and then this code
could be modified to check the value and preform the right action based on
the value:


<SCRIPT language=javascript>
<!--
var nav = window.Event ? true : false;
if (nav)
{
  window.captureEvents(Event.KEYDOWN);
  window.onkeydown = NetscapeEventHandler_KeyDown;
}
else
{
  document.onkeydown = MicrosoftEventHandler_KeyDown;
}

function NetscapeEventHandler_KeyDown(e)
{
  alert("Netscape:Key="+e.which);
}

function MicrosoftEventHandler_KeyDown()
{
  alert("IE:Key="+event.keyCode)
}

-->
</script>


i put this by itself in an html file and when i pressed a key from either IE
or NS it told me the value of the key i pressed so hopefully it will work
for you too on the handheld devices (:


----- Original Message -----
From: "Troy Sosamon" <[EMAIL PROTECTED]>
To: "Tango List" <[EMAIL PROTECTED]>
Sent: Wednesday, July 02, 2003 12:25 PM
Subject: Witango-Talk: Java Script & Handhelds


> I am in the process of doing some R&D for making web pages that are going
to
> be used by PDAs running Pocekt PC 2002.
>
> The device I am testing has some keys on it called Action and Escape.
> I was wondering if anyone has a javascript that will capture the key so I
> can see what this thing is really sending and be able to test for those
keys
> being pressed.
>
> Ideally when everything is done, I want to write pages where the ACTION
> button will Submit the form and the Escape key will Cancel the form.
>
> Thanks for any advice.
>
> Troy Sosamon
>
> ________________________________________________________________________
> TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf

Reply via email to