• Advertisement
Sign in to follow this  

ready made key mapper?

This topic is 1897 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 guys long time no see (back to programing after YEARS)

before i make one of my own (and after googleing it) i wanted to ask if code for a key mapper exists out there.
i meen the player side prefrence key map that lets to say what key dose what action.

need it for mouse and joysticks too...

if any1 knows of one rolling around out there i would save me a ice amount of time if not... any tips on how to make one?

Share this post


Link to post
Share on other sites
Advertisement
For my current project (in C#) I created an enumerated type that represents the actions you can perform. Then to map a key I simply use a Dictionary with a Keys parameter as the lookup key. When a key is pressed I lookup the KeyAction and fire an appropriate event. In my case I don't handle joysticks/gamepads or remapping of the mouse though.

Share this post


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

  • Advertisement