Pre 1.2 HOWTO change the controls (including mouse) to whatever you want with AutoHotkey.

Discussion in 'Guides' started by UsuRpergoat, Aug 15, 2011.

Thread Status:
Not open for further replies.
  1. UsuRpergoat

    UsuRpergoat Green Slime

    I like Terraria but I do not like the controls. What really bugs me about this game is that you can't change/remap/bind the mouse buttons (like you can in TF2 or CS:S). I posted a question here about how I can map jump to the R mouse button. The only reply was to try a macro program. That helped but didn't really solve the problem. After some googling I came across a program that I hadn't used in few years, AutoHotkey.

    AutoHotkey -
    For those of you who are not familiar with AutoHotkey...
    Among many other things.
    This is perfect to fix the downfalls of Terraria's control settings.

    And now, HOWTO change the key/mouse mappings to whatever you want.

    First, download AutoHotkey from the website and install it.

    It's worth reading a little bit about how AHK works. The website and the help file have tons of info.

    AutoHotkey has a basic script that it runs everytime it is run. (but is editable to set whatever you want)
    This is set by default to do 2 things; Launch the AutoHotkey website on the default browser and and find/launch Notepad. This is done by pressing the key combination set in the settings.
    For our purposes, we are just going to comment these out, add our own key/mouse bindings and reload the script.
    Which looks like this.
    ;This next line finds the Terraria window and checks to see if it is active
    #IfWinActive ahk_class
    ;Makes 4th mouse button to use "e" , the grappling hook
    ;Changes jump to right mouse click
    ;Changes the "use" function (open door, chest, etc), to spacebar
    ;Switches Mouse wheel up and down
    Everything with a ; in front of it means that it will be ignored as a comment.

    This script will only bind these key/mouse settings if Terraria is the active window, thanks to this line here.
    #IfWinActive ahk_class
    I had to do it like this because Terraria changes the name of its title window every time it launches. AutoHotkey has a utility built in to give the the ahk_class name of the window.
    This is what it looks like for me. I'm running Windows 7.

    This may be different for you.
    Feel free edit anything and everything. You probably won't want the same key/mouse bindings as me.

    Copy and paste the code and make whatever changes you want and put it into the AutoHotkey.ahk file. Then, in the AHK program, click file, reload script. And your all set. Leave AHK running. Open Terraria and you are good to go.

    Lawura, AtoMcroms and scaryguy334 like this.
  2. Rydian

    Rydian Blood Crawler

    Why not use Joy2Key, which has a simple remap interface akin to many games people are used to, and requires less setup and scripts?
  3. UsuRpergoat

    UsuRpergoat Green Slime

    Wasn't aware of what Joy2key was until just now.
    According to the site.

    Which is not what I want to do.

    If you are familiar with AutoHotkey, then my 6 line script is cake.
    I wrote this as simple as possible for people who had no idea what it was or how to use it.
  4. Novate

    Novate Bone Serpent

    Ah nice if I ever feel like rebinding those troublesome keys I might load up my own autohotkey for once.
    Though i'm fine with the default binds for now.

    Anyway shouldn't this be in the guide's section?
  5. UsuRpergoat

    UsuRpergoat Green Slime

  6. Rydian

    Rydian Blood Crawler

    Ah, you're right, I had assumed it could take mouse input as well (since it can remap to mouse actions I thought it could map from mouse as well).
  7. Novate

    Novate Bone Serpent

    just ask a mod to move it, much easier ;p
  8. UsuRpergoat

    UsuRpergoat Green Slime

    Well, that crossed my mind, but I was actually looking for in game support about mouse keybindings. maybe it's better if it was in both. :)
  9. Mistress Rarity

    Mistress Rarity Nightmarity

    Moving to appropriate forum ♥
  10. UsuRpergoat

    UsuRpergoat Green Slime

    uh... now that was silly to move it after i already posted it, now there are 2 of the same thing in the Guides sections. :)
  11. Mistress Rarity

    Mistress Rarity Nightmarity

    Oh. Well, I got a report saying to move it so I did. I'll lock this one ♥
Thread Status:
Not open for further replies.

Share This Page