Properly limit the space button so it can't go past the max text length.