469,306 Members | 2,547 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,306 developers. It's quick & easy.

Keypress in Opera

Hi,
I'm having quite an annoying problem with Opera.
I have set up a keypress event handler which should react to any
alphabetic character.
In Opera however when I press F5 the event.keyCode=116. And when I press
"t" event.keyCode=116. How can I make the distinction between F5 and "t"?

Is there some reference for javascript objects in Opera somewhere?

Thanks!
Robert
Apr 19 '06 #1
2 2218
Robert wrote:
Hi,
I'm having quite an annoying problem with Opera.
I have set up a keypress event handler which should react to any
alphabetic character.
In Opera however when I press F5 the event.keyCode=116. And when I press
"t" event.keyCode=116. How can I make the distinction between F5 and "t"?

Is there some reference for javascript objects in Opera somewhere?


Yes - but I can't remember where to find it. Searching terms like "Opera
javascript keypress" should help.

I dealt with this awhile ago when I built a "breakout" type game
(incomplete - just a trial run) - feel free to take a look over the code
here: http://members.dslextreme.com/users/tony23/bricks.htm

I'm pretty sure you can find the answer in there.
Apr 19 '06 #2
Tony wrote:
Robert wrote:
Hi,
I'm having quite an annoying problem with Opera.
I have set up a keypress event handler which should react to any
alphabetic character.
In Opera however when I press F5 the event.keyCode=116. And when I
press "t" event.keyCode=116. How can I make the distinction between F5
and "t"?

Is there some reference for javascript objects in Opera somewhere?

Yes - but I can't remember where to find it. Searching terms like "Opera
javascript keypress" should help.


I searched before posting and didn't quite get what I was looking for.
I dealt with this awhile ago when I built a "breakout" type game
(incomplete - just a trial run) - feel free to take a look over the code
here: http://members.dslextreme.com/users/tony23/bricks.htm
Still fun to play :)
I had in mind to make tetris in javascript some time.
I'm pretty sure you can find the answer in there.


Didn't find what I was looking for. But I found out by myself that Opera
also supports the proprietary which property for keyboard events. And I
can make the distinction now.
Apr 20 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Darryn Ross | last post: by
3 posts views Thread by Raul M. Colon | last post: by
2 posts views Thread by rege | last post: by
3 posts views Thread by Fia | last post: by
1 post views Thread by mens libertina | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.