updated key event demo