473,508 Members | 2,289 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2291
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
7326
by: Darryn Ross | last post by:
Hi, I am trying to catch the KeyPress event on my datagrid but it isn't working... i have also tried registering the handler with the event like this... dgGLBatch.KeyPress += new...
3
8453
by: Raul M. Colon | last post by:
Is possible to assign a click event to a button control in a Web form just pressing the return key? Something like windows forms where you can assign this action to a default control. For example,...
2
5388
by: rege | last post by:
Hi, I have two applications developed in C# say A and B. When user presses key "L" with applicaition A active , it causes a keypress event which causes application B to run. Application A then...
1
6149
by: Rene | last post by:
Hi, I am running is some problems with the KeyPreview and KeyPress events. The KeyPress event is only triggered when there this an focusable control on the form. When all controls are disabled...
4
4518
by: Tom | last post by:
I have a VB.NET user control that I wrote - this control has three or four other controls on it (textbox, combobox, datetime picker, etc). Now, whenever the control is on a form and the user enters...
15
4011
by: Adam J. Schaff | last post by:
I have noticed that if a user closes a form via pressing return (either while the OK button has focus or if AcceptButton is set to OK for the form) then the "ENTER" keypress event fires ON THE...
3
6836
by: Fia | last post by:
Hi In Visual Basic 6 I could call keypress with an integer of a choosen key. For example I could call a textbox's keypress with the number 13 (for the enter key). But now in Visual Basic .Net I...
1
2031
by: mens libertina | last post by:
Hello, I am programming a little game, and I want the focus to move from one input box to the next as the user types. I have image-input pairs so the user is typing a letter under a picture. ...
4
2783
by: Jeff | last post by:
....still new at this. ...hopefully a simple question Is there some practical way of altering the function of a keypress in Visual Web.net 2005 using VB without causing a postback on each...
0
7224
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7323
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7380
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7039
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5626
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5050
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4706
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3192
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3180
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.