Initialization of key events