Control android tv-box with my tv's remote?
After much reading, I ended up achieving what I wanted thanks to CEC. Thankfully the M8, and my VIZIO TV support CEC, which I had never heard of before, and I can control the M8 with my TV remote control (actually I'm using my direct TV remote which is programmed to control the TV). The signals get passed through the HDMI cable. 

I had to enable CEC on both the M8, and my TV. At first it didn't work, but I tried with another HDMI cable and it started working. Apparently not all HDMI cables implement the pins that are used to do CEC, and the cable that came with the M8 did not.