Is there a way to use the TVs native keyboard rather than making a custom one with the Keyboard component? I want to be able to use Samsung’s built in native keyboard for the Samsung build, LG native keyboard for the LG build, etc.
You should be able to. Lightning is just a UI framework inside a browser. You’ll need to do some conditional logic to make it work for each device.
Seems like you will need to create an
<input> and give it focus to show it - Lightning is listening for the keyboard inputs and should be getting them at the top level. The thing you’ll need to figure out is switching focus from the input back to the canvas take to give focus control back to Lightning.
So then how would I go about doing this? Is it a matter of appending an input to the page from a .ts file, or should there exist an html file that contains an input, or some other method?
Lightning runs inside a web browser - in an HTML with a and tag. Inside your App component you can create an input. Document is a global you can use from any Lightning component (or any web browser APIs)
let input = document.createElement('input'); document.body.appendChild(input);
So then how would you handle switching focus from the html element back to the canvas?
document.querySelector('input').focus(); // when done getting inputs from native keyboard document.querySelector('canvas').focus();