Window focus fix

Added support to un-hold keys whenwindow looses focus
Small tweak