Very basic javascript module for updating and storing the keyboard and mouse states