I haven't had success with input switching, but here is my workaround based on a suggestion from somewhere around here...If your devices power on and off properly (which mine don't) it's only one extra button press.
Press activity 'A BUTTON', then 'POWER' in order to watch TV
To start watching your ROKU, press activity 'B BUTTON' without hitting the power button. You will first need to assign a button (maybe #2?) to switch the TV to HDMI 2. Unfortunately this means that you can't use the the #2 button on the keypad while watching your ROKU.
To watch KODI, press activity 'C BUTTON' without hitting the power button. You will first need to assign a button (maybe #3?) to switch the TV to HDMI 3. Unfortunately this means that you can't use the the #3 button on the keypad while watching KODI-no great loss obviously.
You should also program the #1 button to switch back to HDMI input for watching TV.
Since you are using the same input on your a/v unit, and only changing the HDMI inputs for your 3 activities, it should be fairly simple. LOL
You could use the color wheel thingy to program a 'power all off' command.