Results 1 to 32 of 32

Remapping Hotkeys - Alternative Solution

  1. #1
    bail0ut
    Guest

    Remapping Hotkeys - Alternative Solution

    I was having a tough time with the keyboard commands in the game so I decided that I would remap them. For this I amusing a program called autohotKey which is a free app available at www.autohotkey.com. Download that before continuing

    In short this is a key remapping software that allows you to write scripts which can be enabled or disabled at any time. Typically I will start the script and then run the game (which can be done automatically, though I have left that out for now for simplicity). When you finish the game don't forget to stop your script or your keyboard will be messed up.

    my script is as follows

    ;start of script

    ;reassigning the arrow keys
    a::left
    s::down
    d::right
    w::up

    ;reassigning the view keys
    q::Backspace
    e::alt

    ;end of script

    Copy the text above to Notepad and save it with the extension ahk (example companyOfHeroes.ahk). To run the file simply double click it and it will appear in the tray.

    As you can see the syntax is very simple. It is in essence the key you want to use followed by two colons and then the existing key in the game. there is an extensive help file with autohotkey that you can refer to as well to add additional keys (which I will be doing) and functionality

    Hope this helps - let me know if you have any questions

    bail0ut
    Last edited by bail0ut; 11th Nov 06 at 5:58 PM.

  2. #2
    Yeah, I was wondering why remapping was not included. Is there a way to remap the rotate view to the depressed middle mouse wheel? Slightly annoying taking my eyes off the screen to find the 'alt' key just to rotate the view.

    Thanks.

  3. #3
    bail0ut
    Guest
    sure

    Just replace the line

    e::alt

    with

    MButton::alt

    bail0ut

  4. #4
    Yes, yes, yes - work just fine.

    Thank you sir!

  5. #5
    bail0ut
    Guest
    No problem -

    I am working on an addition so that the script is only active for the game

    bail0ut

  6. #6
    Fenn
    Guest
    I've been using the same program for a long time now for all my games. I highly recommend it as well!

  7. #7
    project_demon
    Guest
    remap keyboard? what happens when you chat? For example if you remapped "a" will you still be able to type a?

  8. #8
    bail0ut
    Guest
    project_demon

    good question, I have only been playing the single player mission so I have not had that issue. Luckily it is easy to pause a script as well. For example you could setup a hotkey (let's say Ctrl-T) which will both disable the script and start the chat box. You would then use the enter key (I assume that this is what is used to send the line of chat as in all programs) to enable the script again.

    I'm not sure of the exact syntax but i believe this would work. I am assuming that "T" is used to start a chat line (don't have the manual with me), and that enter sends the line.

    ^t:: ;this assigns ctrl-t to start a chat box
    SendInput T ;this sends the keystroke T to the game to start a chat window
    Suspend ;this suspends the script
    Exit ;End this block of code

    enter::suspend ;this restarts the script once you are done chatting no need to exit as there is only 1 line

    Can someone try this out and let me know. Hope it works. Also if someone sends me all of the keystrokes in the game I will setup the file so it can be easily edited.

    thanks

    bail0ut

  9. #9
    djukel
    Guest
    Sweet! I just today wanted to rebind arrow keys.

  10. #10
    "Yeah, I was wondering why remapping was not included. Is there a way to remap the rotate view to the depressed middle mouse wheel? Slightly annoying taking my eyes off the screen to find the 'alt' key just to rotate the view."

    I have a similar question about depressed mouse wheel panning... the default scrolling is totally annoying, unintuitive, and to my senses it renders the function useless. I can kind of see the point of doing it the default way, like you are dragging the map around with your hand, but DoW allows you to reverse the mouse pan in the controls menu, so it mystifies me why CoH doesn't allow the same.
    The Mysterious Origin of the Ork
    Fanboy Fiction by MeatPacker

  11. #11
    step2ice
    Guest
    I tried autohotkey with DoW and Generals but neither of that games worked with it.
    Maybe CoH will do.
    Currently I'm using perfect keyboard pro.
    Another nice, simple and free macro tool is MacroMaker.
    Just google for it.

  12. #12
    bail0ut
    Guest
    OK

    I have updated the script a little bit so that

    1. When you launch the script it will launch the game (assumes default installation path)
    2. The Keyboard commands are only applicable in the game
    3. Chatting will work as normal by pressing Ctrl-T to start chatting and Enter to end chatting
    4. The 4th mouse button is used as the Alt key
    5. Enter key can be used at any time to toggle the script on/off


    ;Start of Script

    Run, RelicCOH.exe, C:\Program Files\THQ\Company of Heroes\

    SetTitleMatchMode, 2
    #IfWinActive Company Of Heroes

    a::left ;assign a to left arrow
    s::down ;assign s to down arrow
    d::right ;assign d to right arrow
    w::up ;assign w to up arrow
    XButton1::alt ;assign the 4th mouse button to alt

    ^t:: ;this assigns ctrl-t to start a chat box
    Send {enter};this sends the keystroke enter to the game to start a chat window
    Suspend ;this suspends the script so that you can type without hotkeys active
    Exit ;End this block of code

    enter::suspend ;this restarts the script once you are done chatting

    ;End of Script

    Ideas, suggestion, comments... let me know

    bail0ut
    Last edited by bail0ut; 4th Oct 06 at 6:31 PM.

  13. #13
    Bridgers hotkey thing pwns.

  14. #14
    bail0ut
    Guest
    Yah bridgers hotkey thing is pretty sweet - this is low tech and is really just for moving the scroll keys and view control

    bail0ut

  15. #15
    Thanks bailout, but I tried on my own - what did I do wrong here?
    Code:
    ;start of script
    
    ;reassigning the arrow keys
    a::left
    s::down
    d::right
    w::up
    
    ;reassigning the view keys
    q::Backspace
    MButton::alt
    capslock::0
    
    ;end of script
    I was trying to change the Map key "0" to the caps lock key, but when in the game the 0 key still works and the caps lock does nothing.

  16. #16
    bail0ut
    Guest
    Here are 2 things that you can try

    1. I believe that the program is case sensitive so try using

    CapsLock::0 (as opposed to "capslock")

    2. If you are trying to map the 0 key from the keypad (vs the zero key between the 9 key and minus key) you need to specify this, the command would be as follows

    CapsLock::Numpad0

    Hope that this helps - Let me know

    bail0ut

  17. #17
    What exactly is the problem with the normal way to remap the hotkeys?

    http://wiki.reliccommunity.com/Moddi...Heroes/Hotkeys

    If you search for bridgers grid keys on the forum you even get a version where you don't have to fiddle around with the sga packer.

  18. #18
    meatb@ll
    Guest
    The only advantage I can tell is that this way doesnt modify any CoH files so you don't have to worry about removing the modded hotkeys when you patch the game. It's also a bit easier to do for those technically impaired users.

    Otherwise, it's just another process running in the background effecting performance - even though it probally uses very little CPU.

  19. #19
    bail0ut
    Guest
    Laz4rus

    Nothing special about this workaround - just an alternative. The one nice thing that it allows for is remapping the mouse buttons.

    I have used bridgers system and it is very good, but personally I just want to remap a few keys and I find this very simple.

    bail0ut

  20. #20
    dvbuljan
    Guest

    Pause key

    How to remap Pause key to Space?

    I have put:

    Pause::Space ;Pause in Space key

    but nothing happens! :hmm:

    Please help!

  21. #21
    DayGloNinja
    Guest
    can anyone write a script to remap the screen print button to something like shift+ctrl+C? I have a mac book pro that doesn;t have a print screen button and I would like a work around.

  22. #22
    bail0ut
    Guest
    dvbuljan,

    You have it almost right except you need to reverse the order.

    Space::Pause

    let me know if that works

    --------


    DayGloNinja

    Assuming autohotkey works on a mac you can try adding the following line to your script

    ^+C::PrintScreen ;maps Ctrl-Shift-C to printscreen

    Hope that helps. How is the performance on the Mac btw?

    bail0ut

  23. #23
    Member MadCatChiken's Avatar
    Join Date
    Jun 2003
    Location
    London, UK, Hiigara.
    Key remapping was done awhile ago.

    http://tales.tsncentral.com/?p=83

    I made a game! :D Clicky!

  24. #24
    bail0ut
    Guest
    MadCatChicken -

    as mentioned earlier, this is an alternative. Use it if you wish or use bridgers system. Luckily we live in a world with options.

    I even edited the topic so there is no confusion

    bail0ut

  25. #25
    DayGloNinja
    Guest
    Bail0ut...

    Thanks. I'll try that. The mac kicks ass... Graphics look amazing. Game speed is really fast too.

    It's a core duo with 2gbs of ram so it chugs.

  26. #26
    dvbuljan
    Guest

    Remapping Pause key

    Yes bail0ut, I noticed that :bag: so I change the order but nothing happens!? Both old and new pause keys are not working!

  27. #27
    bail0ut
    Guest
    dvbuljan

    Hmmmm, give this a try

    space:: send, {pause}

    let me know if that helps

    bail0ut

  28. #28
    Member MadCatChiken's Avatar
    Join Date
    Jun 2003
    Location
    London, UK, Hiigara.
    MadCatChicken -

    as mentioned earlier, this is an alternative. Use it if you wish or use bridgers system. Luckily we live in a world with options.

    I even edited the topic so there is no confusion

    bail0ut
    Oh ok. My bad.


    MCC.:chicken:

  29. #29
    dvbuljan
    Guest

    Pause remapping

    That works! :bow2:

    Thank you very much bail0ut! :howdy:

  30. #30
    jamestr234
    Guest

    pause = spacebar

    space:: send, {pause}

    moving the pause key rocks!


    http://www.autohotkey.com/

  31. #31
    Exaercase
    Guest

    You Are WondeFull !!!!!!!!!!!!!!

    Thx a lot for the Pause trick i've search for so long time and enjoy better the game with space for paue and pereapth i'll try Dawn of War that i not want play 'cause of the pause.

    Thx again you are the best !!!!!

    Heu just a question how automaticly end the script at the end of the CoH i've try IfWinExist Company with the # or not and nothing work somthing have an idea ?????

  32. #32
    bail0ut
    Guest
    Exaercase,

    If you would like to autoexit the script (for example when the application closes) you can add in the following

    Code:
    Loop
    {
     Sleep 5000
    	IfWinNotExist, WindowNameHere
    	{
    	Exit
    	} 
    }
    You will need to replace "WindowNameHere' with whatever the COH window is called (I am not at my computer so I can't remember off hand what it is). This is basically a loop that will run continuously until the game is closed. The reason I put in the 5 second sleep at the start is that I want a delay in the script so that if you are also using this to load the game, the launch will not be aborted

    Hope that this helps

    bail0ut

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •