There's a possible easier way than that, in code generator just set input to No Input plugin. Then you have control of the encoder and push button yourself in your own handlers, you can choose to provide it to tcMenu or not. See the section on manually handling events below.
https://www.thecoderscorner.com/products/arduino-libraries/tc-menu/menumanager-and-iteration/
There are examples of manually setting up both a rotary encoder and a push-button in the IoAbstraction examples.