How to change video to fullscreen and windowed in console

How to change video to fullscreen and windowed in console? This is because Valve doesn't fix the bug of showing scoreboard when pressing Tab, so the quick way would be to make this change as quick as possible.


mat_setvideomode 1920 1080 0 // 1080p Fullscreen

mat_setvideomode 1920 1080 1 // 1080p Window Mode

You can use these to change to windowed/full-screen (specify your own resolution if it's not 1080p).

Then you can bind a key to switch between fullscreen and windowed like this:

bind "F3" "toggle mat_setvideomode 1920 1080 0 1"