support up/down/top/bottom button function