Bind Commands
Below is a basic drawothermodels bind which will toggle x-ray when you press the J key. To change the key this is bound to, press the "Change Key" button. Copy and paste the command into your developer console to apply the bind.
CS:GO
How it Works
The first part of the command "bind j" binds whatever comes next in quotes to the j key. This command actually has two commands inside the quotes, these are separated by a semi colon (this tells the game to treat them as two different commands).
The "sv_cheats 1" command enables cheats - this is required for r_drawothermodels to work. If you aren't on a server that you have admin access to (or in offline mode), you can't enable cheats (so this bind won't work)
The semicolon separates the next part of the bind from the first, which is "toggle r_drawothermodels 1 2". The toggle command will toggle commands between two different settings. We specify 1 and 2 after r_drawothermodels because these are the two settings we want to toggle between when j is pressed. When r_drawothermodels is set to 1, wall hacks are off. When r_drawothermodels is set to 2, wall hacks are enabled.