update keyboard input