1

Basically I want to bind my Mouse 4 button to TOGGLE on and off the voice chat in game. I know how to start it (Bindtoggle) but I don't know the correct name for mouse 5 in console as well as how to get it to change voice chat. Silly question but should be easy to answer I guess.

3 Answers 3

4

Adding onto what Codingale said, your mouse doesn't have any special name. There is mouse1-3 if you have a scroll wheel, and I have seen some that go all the way to 7.

You also stated that you would like it to where you can disable voice chat and reenable it with your mouse. Are you talking about, pressing the binded button and being able to talk, or turning off voice chat completely.

If the first option, Codingale was correct. It is +voicerecord.

If the second option, look at this:

voice_enable 0 - Voices off
voice_enable 1 - Voices on

So, say you had a mouse that had 5 buttons. You could run something like this in console, or make an autoexec to run it as soon as the game starts.

bind "mouse4" "voice_enable 0"
bind "mouse5" "voice_enable 1"

And then you can alternate between pressing those as you see fit :D

Or combine the two into one and use;

    bind "del" "toggle voice_enable 0 1" 

Pressing delete will turn voices off, press it again and it will turn them on again.

And you can also turn voices up and down by using this command:

voice_scale 1 - Default
voice_scale .5 - More Tolerable
voice_scale 0 - Voice volume muted

Source

2

You can use Mouse4 (or Mouse5) as the button. Mouse1 is left button, Mouse2 is right and Mouse3 is the middle mouse button.

See this post where someone asked a similar question.

bind "Mouse4" <command> works, and the voice chat is +voicerecord

If this doesn't work try editing a bind and the pressing the button it asks and type in host_writeconfig and you should be able to view the config.cfg and find it.

8
  • 2
    Glancing at this: wiki.teamfortress.com/wiki/Scripting#List_of_key_names shows mouse4 might be diffrent I'm not sure I really wish I had a way to test. Also, CSGO uses the same commands and everything as TF2, CS:S, HL2 and Garry's Mod so all of those can help find out what key it is. So try mouse6 maybe? Be sure to tell me so I can update my answer if I'm incorrect!
    – Codingale
    Commented Jan 14, 2015 at 20:16
  • Also have a look at this: wiki.teamfortress.com/wiki/Scripting#Toggles
    – Codingale
    Commented Jan 14, 2015 at 20:20
  • 3
    Keep in mind that any binds you don't put in config.cfg won't be saved across map- or server-changes. Commented Jan 14, 2015 at 21:19
  • You sure? I have my entire keybinds in a config.cfg file, editing it here and going in game changes them.. at least for Garry's Mod it does.
    – Codingale
    Commented Jan 14, 2015 at 23:08
  • 1
    ...I think you misread my comment Commented Jan 15, 2015 at 0:16
1

Really it depends on your mouse, I have a Razer Naga mouse that has mouse1-5, then had 12 more buttons that act as either the keypad buttons or the 1-0,_,= at the top of my keyboard.

My thought would be to figure out how your buttons work, if they are mouse4, mouse5, etc. or kp_end, or other keypad functions, then bind out with the commands listed by the other answers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.