update keyboard control