当字数到达后,可以通过判断keyCode的方法看是否为tab,enter,shift