Make "Bank Selector" based on button "State" or signal rather than button itself


I’d like to be able to assign buttons 1-8 to do a thing. Then be able to hold button 9 and use buttons 1-8 to select through banks 1-8.

Maybe hold button 9 and push encoder 1 in will select bank 9.

IDEALLY: while holding button 9, button 10-X can do different things too, not just change bank.