Could you please clarify the issue you’re having? It’s hard to read your post as it’s written with a confusing language.
For now, it seems like you’re triggering a new locomotion seperate from the walking / running one when the variable named “inspect” gets set to true. I think this was intentional, is your issue about not being able to go back to the other locomotion? You can simply achieve that by setting that variable of yours back to false when you stop holding the same key or click on another key. Because it seems like that’s the only condition for that animation series to be activated and that wouldn’t happen until the value changes again.