How many gray-code bits are there? do you need bit-mode outputs or something more interesting?
For 4 bits of gray-code and a button you could put the button onto one of the bits.
For more bits of gray-code it is more difficult.
The various mux components are another option.
linuxcnc.org/docs/2.7/html/man/man9/mux_generic.9.html
You can set one of those up with as many input bits as you want, though you then need a "setp" for every possibly input combination. But the output value can be int or float, rather than just bit.