473,320 Members | 2,112 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

onkeydown bug with multiple keys in Firefox/Linux?

4
I'm working on some javascript games, and I encountered what appears to be a bug specific to Firefox on Linux (I'm using several recent versions of Ubuntu).

I'd love to get some help verifying that it is a bug as well as possibly devising a workaround.

Here's the situation: in my game, you control a space ship with the arrow keys. You move the ship by pressing the arrow keys, and often you will press both the up key and the left or right key at the same time.

This seems to work fine in the latest versions of IE and Safari and Firefox(Win and Mac). But there's a small but significant glitch in Firefox(Linux): onkeydown doesn't register the second key (while the first one is still being held down) unless you tap the second key twice.

I prepared an example so that it is easier to visualize.

http://fleeingrabbit.com/space_taxi/key.html

The example only uses the up/left/right keys. Trying holding one of those keys down. The webpage will indicate which key is down. While holding the first key down, press one of the other two keys. The page *should* immediately indicate the second key, but in Firefox(Linux) nothing happens. Now, while still holding the first key, hit the second key again and the page will indicate properly in all browsers.

I hope I've explained this problem ok. It is a small glitch but it has a significant impact on game play with certain games.

Thanks for any input!
Jay Cotton
Jun 4 '07 #1
2 1207
ra88it
4
Sorry - I forgot to make a hyperlink for my example. Here you go:

http://fleeingrabbit.com/space_taxi/key.html
Jun 4 '07 #2
acoder
16,027 Expert Mod 8TB
I'm keeping this here, but I've also copied it over to the Linux forum. Watch out for the thread over there too.
Jun 5 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Z | last post by:
I have sub-classed the TextBox. In its OnKeyDown event I can intercept key strokes, examine them, etc. When I get a certain keycode (e.g., 'A') I want to change it to another unicode key from a...
4
by: Andrew DeFaria | last post by:
I'm trying to use the onKeyDown event on a text field. I intersept the keystroke, interpret it and then do certain actions based on certain keys stuck. If a special key is stuck I replace the value...
4
by: Tony | last post by:
I'm having trouble getting Opera to recognize a repeating key event - I was wondering if anyone had experience with this. Basically, I am trying to move a <div> based on the arrow keys that are...
4
by: Udi | last post by:
Hi All, MyRichEdit is derived from RichTextBox. I'm overriding OnKeyDown. I'm trying to handle the TAB key but without printing it in the edit box: protected override bool IsInputKey(Keys...
4
by: ra88it | last post by:
I'm working on some javascript games, and I encountered what appears to be a bug specific to Firefox on Linux (I'm using several recent versions of Ubuntu). I'd love to get some help verifying...
1
eboyjr14
by: eboyjr14 | last post by:
I have this UserScript for Grease monkey. but I can't get the onleydown event to fire in FIREFOX only. I've looked everywhere! // ==UserScript== // @name iGoogle Suggest //...
3
by: gjain12 | last post by:
Hi all, I am using the following code to disable the ctrl+a/c/v/x keys. <html> <head> <script language="JavaScript" type="text/javascript"> function disableCtrlKeyCombination(e) { //list...
8
by: Tony Johansson | last post by:
Hello! I wonder can somebody explain when is it suitable to use these methods OnKeyUp, OnKeyDown and OnKeyPress because these raise an event. These are located in class UserControl. If these...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.