Handle key events in crash.js