Functionality like this is implemented in shooters such as Interstellar Marines and Ground Branch, and simulators like DCS and Falcon BMS.
It will allow more efficient use of keyboard and controller keys for mapping multitudes of functions. For example sprinting and toggle walk/run could be bound to the same key. If three functions were allowed, something like toggling tactical pace, walking, and sprinting could be done from the same key.