Restrict movement within the volume

I am using the arrow keys to move

when it happens at that volume i would like to restrict up and down

captura5