if key = GA_UP then if Selected = 0 then SetCursor(3) else CursorUp; if key = GA_DOWN then if Selected = 3 then begin SetCursor(0) else CursorDown;