Add socket command and key events