I am trying to make new keybindings to modify a game I play called Minecraft. But I need a map of the keyboard with the number codes (or whatever they are called). A downloadable image would be best so I can always have it. Please help me!
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
I am trying to make new keybindings to modify a game I play called Minecraft. But I need a map of the keyboard with the number codes (or whatever they are called). A downloadable image would be best so I can always have it. Please help me!
For the KeyEvent codes, see the KeyEvent class API doc. It defines the variable names for the code values.
okay ill check that, if it is what i need, i will then mark as solved
well, I found something with stuff like VK_ALT, but i need actual numbers
The numbers for these constants should be outlined in the javadoc API.
Constant Field Values (Java Platform SE 6)
If you read the API doc you will see that all the VK_xxx variables are ints. IE they are all numbers.i need actual numbers
Hardcoding magic numbers in a program is NOT a good style. Using named variables makes the code easier to understand and to maintain.
If you see: if( code == 65)
what letter is that refering to?
if you see: if (code == KeyEvent.VK_A)
you'd guess the A key
Thanks, everybody!
There's always the Java Tutorials: How To Use Key Bindings.
Key binding shows the action of the command as no confirmation is required. By providing a new key binding for the existing action. Key bindings are also use by mnemonics. Using a key binding is not a simple process.