Thank you for contacting us, according to your question you can create an Activity containing your TV and cable box, once it is created you can click on Edit - Assign commands for remote keys, then you can select the keys on the remote control to assign the commands you need for your device.
Some of the keys also support short press and long press, you can assign two different commands on one key.