getting the keyboard logic in, still some tweaks needed