Add keyevent method