update demo, add keydown event