473,394 Members | 2,168 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,394 software developers and data experts.

Assigning Keyboard-Keys for Browser Game

155 100+
I've downloaded an Open Source Maze game and the keys that makes the thingy move through the maze isn't very intuitive and I'd like to change them to the arrow keys. Here's the current setup:

Expand|Select|Wrap|Line Numbers
  1. /*
  2. Set the default keys.
  3. (left, right, up, down, pause, solve, hint, save, header, reload)
  4. */
  5.  
  6. var keys = new Array('j','l','i','k','q','s','h','y','c','r');
How can I set the left, right, up and down arrow keys in the var keys array instead of j, l, i and k keys?

Thanks.

David
Feb 21 '09 #1
2 1719
DavidPr
155 100+
OK, this isn't all that important so lets just forget about it.

Thanks
Feb 21 '09 #2
gits
5,390 Expert Mod 4TB
in case it would be again :) ... then we would need to see how the values are used later on ... because it is relevant to see how the entire keyhandling should work because the keys you wanted to use are 'special' keys ... while the current keys are 'normal' keys ...

kind regards

PS: btw. i changed the thread title to make it more clear what the problem was.
Feb 21 '09 #3

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

Similar topics

8
by: Nolan Martin | last post by:
Is it just me or are there no good librarys out there to access the keyboard or mouse? I have been looking around for a while now and can only find ones that are bundled with a bunch of other...
2
by: martlaco1 | last post by:
Trying to do a simple little form and do searches using the filter by form. Instead of clicking on the icon, I would prefer a keyboard shortcut to enable Filter by Form - can't find one - so tried...
23
by: herrcho | last post by:
What's the difference between STDIN and Keyboard buffer ? when i get char through scanf, i type in some characters and press enter, then, where do the characters go ? to STDIN or Keyboard...
1
by: Linus Sylv?n | last post by:
Hi I'm trying to make a virtual keyboard and having problems with the focusing and seeing to that the keyboard is always on top. If I don't care about the keyboard being on top and use the...
7
by: Don Riesbeck Jr. | last post by:
I'm working on an application (OEM) using C# that utilizes input from a keyboard, and USB Barcode Scanner. The scanner is a HID Keyboard device, and input from it is sent to the system as if it...
0
by: rs | last post by:
Hi guys, I am trying to read from a USB keyboard using vb.net and HID classes. the USB keyboard is not my primary keyboard. I have a ps2 keyboard connected and is detected in device manager as...
2
by: rs | last post by:
Hi guys, I am trying to read from a USB keyboard using vb.net and HID classes. the USB keyboard is not my primary keyboard. I have a ps2 keyboard connected and is detected in device manager as...
0
by: Kevin S Gallagher | last post by:
I found Smart Paster (excellent add-in) VS2005 IDE Add-in under http://msdn.microsoft.com/msdnmag/issues/05/12/VisualStudioAddins/default.aspx#S3 Decided to add my own menu item which works fine...
2
by: patronise | last post by:
I have this bit of code that at the moment moves the flash to the specific scene and frame at the press of any key on the keyboard. However, I want to modify this so that it works with specific a...
1
by: JohnSmith70 | last post by:
I am storing previously entered values of a,b,c in a vector as you can see below. Later the user has the option to use one the objects from the vector, and assigns the value to the variables, which...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.