Need help with key binding

VA_ChrisVA_Chris Join Date: 2013-02-22 Member: 183263Members
Hello, I'm to make binds that will swap other binds on the fly without going into the options. I want to do this because I use a mouse button to use metabolize and left shift to run and sneak. Furthermore, I don't want both buttons bound to the command at the same time.

I'm currently trying the following commands:

bind F5 bind LeftShift MovementModifier

and

bind F6 bind MouseButton4 MovementModifier

This dosn't work. How can I make this work?

Thanks

Comments

  • GhoulofGSG9GhoulofGSG9 Join Date: 2013-03-31 Member: 184566Members, Super Administrators, Forum Admins, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, Reinforced - Supporter, WC 2013 - Supporter, Pistachionauts
    edited April 2016
    Sorry for the late answer but as far as i know what you want to do is not possible to do with the bind command. The bind command can only bind console command strings to given keys and not reassign key bindings.
  • NominousNominous Baltimore, MD Join Date: 2012-02-18 Member: 146518Members
    edited April 2016
    I've been thinking about this and I realized you can use AutoHotkey to swap key functionality. If you find that certain keys or mouse buttons stop responding after running a script, don't panic and just suspend the script. I am not responsible if anything happens to your computer.

    If you want to give this a try, open the console in-game and enter the following:
    bind LeftShift MovementModifier
    unbind MouseButton4
    
    Install AutoHotkey, create an .ahk script, and paste the following:
    F5::Suspend On
    F6::Suspend Off
    LShift:: SendInput {XButton1 Down}
    LShift Up:: SendInput {XButton1 Up}
    XButton1::LShift
    
    Run the script in AutoHotkey and it should hopefully work. If it doesn't, you'll have to search the AutoHotkey documentation and forums. I don't have much experience using it and I failed at creating a crouch toggle script using XButton1.
Sign In or Register to comment.