Getting IR codes

I am trying to figure out how to get the ir codes from the broadlink rm 3 mini. I know how to call the service and see the codes which is fine but for example how can I get the code to change it right to a specific input vs having to hit source,source, source over and over. I was able to find thr codes for my samsung tv but not my lg sound bar.

You’ll have to try and find a “discrete” code that works for your gear online.
Even if the original remote doesnt support "direct to " , without cycling through - the code may still exist…

https://www.google.co.uk/search?q=discete+rf+codes&oq=discete+rf+codes&aqs=chrome..69i57.5334j0j9&sourceid=chrome&ie=UTF-8