Use a button as Right Thumbstick

Hi. Is there a way to use an UI button to have the same function as the right thumb stick X-Axis (or generally the Turn Rate input action) when i leave the key boundaries while pressed? Basically i want it to use its main action when clicked, but when pressed and move your finger out of the button boundaries i want it to behave like a joystick, and change my turn rate by an input or default value. Or maybe even have a hole in the middle of the right virtual joystick to stick my button in and be able to turn while sweeping outside of the button without having to click there.