I started by writing a user interface that handled they keyboard events in a thread and communicated to the main thread using a message queue.
IMO that's a good easy first step :)
I find that https://github.com/casey/just is a great answer to a lot of problems in this thread.
I have a justfile in all my projects now and I'm very happy.