Jump to content
  • Advertisement
Sign in to follow this  
rain711

changing enter to F2

This topic is 4837 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi everybody: I have this EXE file it is for a game. When you run the game and when you hit [ENTER] on the keyboard A dialog is created that pop ups to enter some chat and send chat message. I would like to know if I can change the "ENTER" key with an F2 key. What I mean is that instead of hitting the "Enter" key on the keyboard I want to hit the F2 key (or anyother key) to perform the same task described above. I appreciate your responce.

Share this post


Link to post
Share on other sites
Advertisement
This is possible. However, you would require a disassembler or hex editor of some sort, also probably a debugger or assembly tracer, and a good knowledge of the structure of PE type executables. With these tools and skills, you would be able through repeated testing and experimentation to trace the command that compares a value received from the keyboard to a value stored in the program, and change the value stored in the program (probably a scancode, but not necessarily) from that of the Enter key to that of the F2 key.

That's a lot of hard work for what seems to be a very negligible result, however. Your only other options depend on the mercy of the person who programmed it -- if they provided recompilable source, you can change it at the source level; or they may have provided an option in the program itself to change the keys (which seems unlikely in this scenario).

Share this post


Link to post
Share on other sites
Quote:
Original post by TDragon
This is possible. However, you would require a disassembler or hex editor of some sort, also probably a debugger or assembly tracer, and a good knowledge of the structure of PE type executables. With these tools and skills, you would be able through repeated testing and experimentation to trace the command that compares a value received from the keyboard to a value stored in the program, and change the value stored in the program (probably a scancode, but not necessarily) from that of the Enter key to that of the F2 key.

That's a lot of hard work for what seems to be a very negligible result, however. Your only other options depend on the mercy of the person who programmed it -- if they provided recompilable source, you can change it at the source level; or they may have provided an option in the program itself to change the keys (which seems unlikely in this scenario).


Good enough... I am ready to do the hard work of your option one.
I would like to know what disassembler I shoud use and what debugger I should try and what command I need to set for the debugger. please help and be patient with me as I am not a programer.
thankx

Share this post


Link to post
Share on other sites
You would really need to be a programmer if you're going to hex edit it - you'll need knowledge of machine code.

If you disassemble it, you'll need knowledge of assembler.

Google for NASM, there's a disassembler that comes with that.

Share this post


Link to post
Share on other sites
You would really need to be a programmer if you're going to hex edit it - you'll need knowledge of machine code.

If you disassemble it, you'll need knowledge of assembler.

Google for NASM, there's a disassembler that comes with that.

Share this post


Link to post
Share on other sites
Quote:
Original post by Toolmaker
Alternatively, you could see if the program allows you to map keyboard settings...

Toolmaker


you mean an option in the game to remap keyboard.? if so I do not think there is such an option
by the way the F1, F3, F5 and F12 are only assigned.
I wanted to press F2 or F10 instead of ENTER key

Share this post


Link to post
Share on other sites
if this is just for a specific game you could just use a macro program like ezmacros (http://www.americansys.com/ezmacros.htm) or something so when you hit f2 it runs the macro to input enter. well as long as f2 isnt already doing something else. that wont help if you're trying to learn how to do it with programming though :P

goodluck

Share this post


Link to post
Share on other sites
Quote:
Original post by gnomer
if this is just for a specific game you could just use a macro program like ezmacros (http://www.americansys.com/ezmacros.htm) or something so when you hit f2 it runs the macro to input enter. well as long as f2 isnt already doing something else. that wont help if you're trying to learn how to do it with programming though :P

goodluck


Your idea of macro is fine but it will complicate things. I want it to change it via programming. Any idea. The thing is that I have alots of tools to do things, but I do not know how to start or where to look.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!