Basically, I will be playing TF2 for about 15-60 minutes, and all of a sudden, my character will be: 1. Stuck walking in one direction (forward, backward, diagonally, sideways, etc...). I usually get stuck like this for anywhere from a few seconds to a few minutes. It sometimes goes away, but usually I just mash my keyboard and it will disappear.
2. Typing, and then my chat freezes. When in chat, I can't exit chat, no buttons will work, and after I wait a little, I can continue typing. However, there is one little difference: certain keys have different functions. Pressing "a" deletes everything I was writing (this is annoying when I am chatting/trading in a trade server since I can't press the "a" key in fear of losing everything I write. Pressing "v" acts like I paste something into chat (I usually do TF2OP and BP.TF, and so I usually end up typing player profile and trade links into chat when I press v).
3. Some buttons will not work. Occasionally, I can't press the "ESC" key, sometimes I can't go into console, etc...
I can fix it by restarting TF2, but it is such a hassle, and I always need to go back into the same server to continue anything I was doing at the time.
I would appreciate it if someone helped me figure out/fix these problems.