The problem is not the keyboard but the game and/or your Internet connection. This happened to me also while I was playing the game and there was no way I could solve it. You are experiencing lag between your computer (client) and the server. Try to close all the background applications, download manager or any open connection to any file sharing protocols (P2P). Make sure you are running the latest version of the software because when the game was released this was rather a bug instead of an Internet connection problem to the servers.