Have you tried doing a factory reset?
Does any keyboard freeze up like that, or just the Samsung Keyboard? Before doing a factory reset, try a cache partition wipe, which won't erase any personal data: https://support.t-mobile.com/docs/DOC-28028. You could also see if the problem persists in Safe Mode: https://support.t-mobile.com/docs/DOC-28008