How to get a macro to work

counter-strike-global-offensive

I'm trying to get voice_enable 0 and voice_enable 1 set as some of my G-keys on a Logitech 510. The only issue is that when I try to use the macro, all it does is make my character jump in place once and it doesn't actually do what it should do; mute the voice channel. Anyone know what it is I'm doing wrong? Thanks for your time, answers are appreciated.

Best Answer

Use a console command in CS:GO to do this. Macro for it is unnecesary.

Command:

bind "key" toggle voice_enable 0 1