Use keyevent instead of tap