Changed keylisteners to communicate with server