Changing TV HDMI ports with Nvidia Shield Pro remote

Your shield remote won’t change the TV input, it’s the CEC settings that does that. You can make sure those settings are correctly configured on your xbox. Then on your TV settings make sure CEC is configured so that it will switch whenever any new device is turned on.