diff --git a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
index b869059e44aafa24c2b49d75e6e4dd78471c0e3a..da7d01af4b2fe77b529c1700592ee778e384e1d9 100644
--- a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
@@ -54,6 +54,7 @@ import com.android.inputmethod.latin.StringUtils;
 import com.android.inputmethod.latin.SubtypeUtils;
 import com.android.inputmethod.latin.Utils;
 import com.android.inputmethod.latin.Utils.UsabilityStudyLogUtils;
+import com.android.inputmethod.latin.Utils.UsabilityStudyLogUtils.LogGroup;
 
 import java.util.Locale;
 import java.util.WeakHashMap;
@@ -701,7 +702,7 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
                     break;
             }
             if (!TextUtils.isEmpty(eventTag)) {
-                UsabilityStudyLogUtils.getInstance().write(
+                UsabilityStudyLogUtils.getInstance().write(LogGroup.MOTION_EVENT,
                         eventTag + eventTime + "," + id + "," + x + "," + y + ","
                         + me.getSize(index) + "," + me.getPressure(index));
             }
@@ -764,9 +765,10 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
                 }
                 tracker.onMoveEvent(px, py, eventTime);
                 if (ENABLE_USABILITY_STUDY_LOG) {
-                    UsabilityStudyLogUtils.getInstance().write("[Move]"  + eventTime + ","
-                            + me.getPointerId(i) + "," + px + "," + py + ","
-                            + me.getSize(i) + "," + me.getPressure(i));
+                    UsabilityStudyLogUtils.getInstance().write(
+                            LogGroup.MOTION_EVENT,
+                            "[Move]" + eventTime + "," + me.getPointerId(i) + "," + px + "," + py
+                                    + "," + me.getSize(i) + "," + me.getPressure(i));
                 }
             }
         } else {
diff --git a/java/src/com/android/inputmethod/latin/Utils.java b/java/src/com/android/inputmethod/latin/Utils.java
index 708634529f136651ebd3ed0e231d12610646e957..e2ce083235e3a49d7fd4984f3d3328672c4dc9c1 100644
--- a/java/src/com/android/inputmethod/latin/Utils.java
+++ b/java/src/com/android/inputmethod/latin/Utils.java
@@ -263,8 +263,25 @@ public class Utils {
             }
         }
 
+        /**
+         * Represents a category of logging events that share the same subfield structure.
+         */
+        public static enum LogGroup {
+            MOTION_EVENT("m"),
+            KEY("k"),
+            CORRECTION("c"),
+            STATE_CHANGE("s");
+
+            private final String mLogString;
+
+            private LogGroup(String logString) {
+                mLogString = logString;
+            }
+        }
+
         public static void writeBackSpace(int x, int y) {
-            UsabilityStudyLogUtils.getInstance().write("<backspace>\t" + x + "\t" + y);
+            UsabilityStudyLogUtils.getInstance().write(
+                    LogGroup.KEY, "<backspace>\t" + x + "\t" + y);
         }
 
         public void writeChar(char c, int x, int y) {
@@ -280,11 +297,12 @@ public class Utils {
                     inputChar = "<space>";
                     break;
             }
-            UsabilityStudyLogUtils.getInstance().write(inputChar + "\t" + x + "\t" + y);
+            UsabilityStudyLogUtils.getInstance().write(LogGroup.KEY,
+                    inputChar + "\t" + x + "\t" + y);
             LatinImeLogger.onPrintAllUsabilityStudyLogs();
         }
 
-        public void write(final String log) {
+        public void write(final LogGroup logGroup, final String log) {
             mLoggingHandler.post(new Runnable() {
                 @Override
                 public void run() {
@@ -292,8 +310,8 @@ public class Utils {
                     final long currentTime = System.currentTimeMillis();
                     mDate.setTime(currentTime);
 
-                    final String printString = String.format("%s\t%d\t%s\n",
-                            mDateFormat.format(mDate), currentTime, log);
+                    final String printString = String.format("%s\t%d\t%s\t%s\n",
+                            mDateFormat.format(mDate), currentTime, logGroup.mLogString, log);
                     if (LatinImeLogger.sDBG) {
                         Log.d(USABILITY_TAG, "Write: " + log);
                     }