How to only enable mouse axis when action button is pressed

Thanks that worked