Ruby 1.9 hotkey fixes (based on a patch submitted by Benjamin Braun).