Separately map controller X axis inputs

Is there a way to map the directions of a controller’s X axis separately? I’m working on adding controller inputs into my game and the keys to move the cursor on the map are separate. I can’t just use GetAxis or GetAxisRaw because I need the cursor to stop at the next location when you press left/right (or a/d) and using GetAxisRaw moves the cursor across the map in less than a second, making it impossible to select any locations between the first and last.

Pseudo-code
dont select another thing unless axis has been in middle first

private bool pressedLastFrame = false;

Update(){


if(analogStickIsToSide==true){
   if(!pressedLastFrame){
     pressedLastFrame = true;
     NextItemSelect();
   }
  
}

if(analogStickToSide==false){
  pressedLastFrame = false;
}

}