Focused Input Popup?

What I want to do is add a binding that opens a popup with an instantly active input field in it, so that any typing goes straight into it (without the need to click with mouse to select).
Also ideally when you press enter to end input, the popup would go away (as opposed to clicking a button to close it) and then more script would be executed based on the input text.

Can this be done? I fiddled with viewbuilder prompts, but quickly got completely lost :(

Any help would be greatly appreciated.