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
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
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.
-
2Glancing 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 trymouse6
maybe? Be sure to tell me so I can update my answer if I'm incorrect! Commented Jan 14, 2015 at 20:16 -
Also have a look at this: wiki.teamfortress.com/wiki/Scripting#Toggles Commented Jan 14, 2015 at 20:20
-
3Keep 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. Commented Jan 14, 2015 at 23:08
-
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.