I did exactly what you recommended. But I made some minor changes. I created a variable and a function and called this function. The character will only turn left or right if the button is clicked. When the button is released I disable the variable.