refactored control key view, made two functions keydown and keyup -> this came from the codereview