Dissable sliders using arrow input for custom editor window

I am trying to dissable the keyboard arrow inputs from effecting sliders in my custom editor UI window.

Is there a specific way to dissable this per slider?

The other way I was looking into doing this is using GUI.SetNextControlName to set the name of the slider element and then using an ‘if’ statement and GUI.GetNameOfFocusedControl to work out if a slider has been focused on and if so try and consume the keyboard input.
However I have been unable to find a consume function for keyboard imput where the key press is flagged not to be used anymore (similar to event.use)

I think you are on the right path. The sliders get the key presses from IMGUI events, so you could check Event.current.isKey or check if Event.current.type is either KeyDown or KeyUp. Then you check Event.current.keyCode to see if the key in question is an arrow key. When that happens, you could call Event.current.Use.

1 Like

You sir are a genious, worked flawlessly thank you very much