Gmod's HUD keeps disappearing


I don’t know why this is happening, but every now and then GMod freaks out and the hud disappears, I can switch weapons and use the Q menu but cant pause the game (esc), Also if i Press on the T or Y buttons (chat and team chat) my cursor moves a bit, The only way to close the game using task manager, what could be causing this?

(User was banned for this post ("Wrong section" - Gran PC))

I’m also occasionally getting this problem and I can’t figure out what’s causing it or why it happens either.

However, I can usually fix it by smashing my keyboard a couple times.