Create a mutex for UI that will help make it possible to run handlers that update UI elements on seprate threads. its far from perfect but should hold up for now.
as beginning stages for forwarding key events to the UI.