Adds support for keyup and keydown