changed key commands from integers to chars