Fixed key events not being handled correctly.