update example with key events