diff --git a/java/src/com/android/inputmethod/keyboard/PointerTracker.java b/java/src/com/android/inputmethod/keyboard/PointerTracker.java
index d6c567ef7555af713387ee09a6d26a4295770880..cfd1e09f907cfd8935299ab5bd43f967c72968ba 100644
--- a/java/src/com/android/inputmethod/keyboard/PointerTracker.java
+++ b/java/src/com/android/inputmethod/keyboard/PointerTracker.java
@@ -560,10 +560,13 @@ public class PointerTracker implements PointerTrackerQueue.Element {
         return (sPointerTrackerQueue == null) ? 1 : sPointerTrackerQueue.size();
     }
 
-    private void mayStartBatchInput() {
+    private void mayStartBatchInput(final Key key) {
         if (sInGesture || !mGestureStrokeWithPreviewPoints.isStartOfAGesture()) {
             return;
         }
+        if (key == null || !Character.isLetter(key.mCode)) {
+            return;
+        }
         if (DEBUG_LISTENER) {
             Log.d(TAG, "onStartBatchInput");
         }
@@ -742,7 +745,7 @@ public class PointerTracker implements PointerTrackerQueue.Element {
         final int gestureTime = (int)(eventTime - sGestureFirstDownTime);
         if (mIsDetectingGesture) {
             mGestureStrokeWithPreviewPoints.addPoint(x, y, gestureTime, isMajorEvent);
-            mayStartBatchInput();
+            mayStartBatchInput(key);
             if (sInGesture && key != null) {
                 updateBatchInput(eventTime);
             }