I am creating a browser such that when the enter key is pressed while the url address text area is in focus.
typeArea.RegisterEventHandler("keydown",this.typeArea_KeyDown)
function typeArea_KeyDown(property){
if(property.key=="Enter")
myBrowser.Navigate("http://www.google.com.sg")
}
Qn: I just want this keydown event to be activated when typeArea object (text object) is in focus, and enter key is down. However, the above event is always triggered when the focus is on other place(not typeArea object), which is not what I want
Qn: What is the difference between keydown and keypress. Help file say
keydown a key was pressed down.
keyup a key was released.
keypress a key was pressed generating a character
But I still dont get it.
Qn:When the user press any key and hold it there, I want the keydown event to be generated only once. I try using autorepeat, but doesnt seem to work
Any one can help me? Thanks.
For this message hanct2002 has been thanked by : mackavi
|