That is one option. You certainly could do 4 rules. You also could if needed use Rule Machine which has a built in button controller. Using RM can get you some advanced settings absent in button controller. But RM is quite heavy and hard to use for something as simple as this.
My other suggestion which I like better due to the clean interface and ease of use is Advanced Button Controller. It is a community app though, and not a stock one if that makes a difference to you. But most everyone that tries it likes it more than Button Controller (stock) app.