process all key events