A smart TV is on the wall, connected to the LAN, and the remote is just out of reach. The ads just started. Who would want to move off the couch when there's a laptop on the lap?
There are apps for cellphones that can control such TVs. So there is a way to send such commands.
A manual with remote control to virtual key mappings is here.
There are also various scripts in python and ruby and so on for the control. They often tend to be somewhat convoluted. But they are a good starting point.
A lot of useful documentation about the control (and hacking and firmware updates) is maintained by our brothers Russians at http://openlgtv.org.ru/.
The TV uses
A bash script was written