bind commands to keydown and keyup