add keyup and keydown methods