make key events work on ruby 1.9