added keyup and keydown