diff --git a/java/src/com/android/inputmethod/keyboard/KeyDetector.java b/java/src/com/android/inputmethod/keyboard/KeyDetector.java
index 777a7952096965ca5e688679052609d7a2f5726c..e7a9d8513319612387c01ae2971dc422f347eb07 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyDetector.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyDetector.java
@@ -79,8 +79,7 @@ public abstract class KeyDetector {
      *
      * @return Allocates and returns an array that can hold all key indices returned by
      *         {@link #getKeyIndexAndNearbyCodes} method. All elements in the returned array are
-     *         initialized by {@link com.android.inputmethod.latin.LatinKeyboardView.NOT_A_KEY}
-     *         value.
+     *         initialized by {@link #NOT_A_KEY} value.
      */
     public int[] newCodeArray() {
         int[] codes = new int[getMaxNearbyKeys()];
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardActionListener.java b/java/src/com/android/inputmethod/keyboard/KeyboardActionListener.java
index 00f3a5153112056bc6dcecd450df295882cfc051..734a55a79acd95aad93ca68d21592cfed1a8d67d 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardActionListener.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardActionListener.java
@@ -19,64 +19,56 @@ package com.android.inputmethod.keyboard;
 public interface KeyboardActionListener {
 
     /**
-     * Called when the user presses a key. This is sent before the
-     * {@link #onCodeInput} is called. For keys that repeat, this is only
-     * called once.
+     * Called when the user presses a key. This is sent before the {@link #onCodeInput} is called.
+     * For keys that repeat, this is only called once.
      *
-     * @param primaryCode
-     *            the unicode of the key being pressed. If the touch is
-     *            not on a valid key, the value will be zero.
+     * @param primaryCode the unicode of the key being pressed. If the touch is not on a valid key,
+     *            the value will be zero.
      */
-    void onPress(int primaryCode);
+    public void onPress(int primaryCode);
 
     /**
-     * Called when the user releases a key. This is sent after the
-     * {@link #onCodeInput} is called. For keys that repeat, this is only
-     * called once.
+     * Called when the user releases a key. This is sent after the {@link #onCodeInput} is called.
+     * For keys that repeat, this is only called once.
      *
-     * @param primaryCode
-     *            the code of the key that was released
+     * @param primaryCode the code of the key that was released
      */
-    void onRelease(int primaryCode);
+    public void onRelease(int primaryCode);
 
     /**
      * Send a key code to the listener.
      *
-     * @param primaryCode
-     *            this is the code of the key that was pressed
-     * @param keyCodes
-     *            the codes for all the possible alternative keys with
-     *            the primary code being the first. If the primary key
-     *            code is a single character such as an alphabet or
-     *            number or symbol, the alternatives will include other
-     *            characters that may be on the same key or adjacent
-     *            keys. These codes are useful to correct for
-     *            accidental presses of a key adjacent to the intended
-     *            key.
-     * @param x
-     *            x-coordinate pixel of touched event. If {@link #onCodeInput} is not called by
-     *            onTouchEvent, the value should be NOT_A_TOUCH_COORDINATE.
-     * @param y
-     *            y-coordinate pixel of touched event. If {@link #onCodeInput} is not called by
-     *            onTouchEvent, the value should be NOT_A_TOUCH_COORDINATE.
+     * @param primaryCode this is the code of the key that was pressed
+     * @param keyCodes the codes for all the possible alternative keys with the primary code being
+     *            the first. If the primary key code is a single character such as an alphabet or
+     *            number or symbol, the alternatives will include other characters that may be on
+     *            the same key or adjacent keys. These codes are useful to correct for accidental
+     *            presses of a key adjacent to the intended key.
+     * @param x x-coordinate pixel of touched event. If {@link #onCodeInput} is not called by
+     *            {@link PointerTracker#onTouchEvent} or so, the value should be
+     *            {@link #NOT_A_TOUCH_COORDINATE}.
+     * @param y y-coordinate pixel of touched event. If {@link #onCodeInput} is not called by
+     *            {@link PointerTracker#onTouchEvent} or so, the value should be
+     *            {@link #NOT_A_TOUCH_COORDINATE}.
      */
-    void onCodeInput(int primaryCode, int[] keyCodes, int x, int y);
+    public void onCodeInput(int primaryCode, int[] keyCodes, int x, int y);
+
+    public static final int NOT_A_TOUCH_COORDINATE = -1;
 
     /**
      * Sends a sequence of characters to the listener.
      *
-     * @param text
-     *            the sequence of characters to be displayed.
+     * @param text the sequence of characters to be displayed.
      */
-    void onTextInput(CharSequence text);
+    public void onTextInput(CharSequence text);
 
     /**
      * Called when user released a finger outside any key.
      */
-    void onCancelInput();
+    public void onCancelInput();
 
     /**
      * Called when the user quickly moves the finger from up to down.
      */
-    void onSwipeDown();
+    public void onSwipeDown();
 }
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardView.java b/java/src/com/android/inputmethod/keyboard/KeyboardView.java
index e0835d7edfb9f78a87ce1f43474d2968942f5d8e..b259e0c03b3eb5390116c983559202f773a1b54f 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardView.java
@@ -79,8 +79,6 @@ public class KeyboardView extends View implements PointerTracker.UIProxy {
     public static final int COLOR_SCHEME_WHITE = 0;
     public static final int COLOR_SCHEME_BLACK = 1;
 
-    public static final int NOT_A_TOUCH_COORDINATE = -1;
-
     // Timing constants
     private final int mKeyRepeatInterval;
 
diff --git a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
index cb3b430d5197219d91c48288683563c237839202..6b052c7e7904811df72503c9d8a9d4ec4d6c0560 100644
--- a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
@@ -95,8 +95,8 @@ public class LatinKeyboardView extends KeyboardView {
 
     private boolean invokeOnKey(int primaryCode) {
         getOnKeyboardActionListener().onCodeInput(primaryCode, null,
-                KeyboardView.NOT_A_TOUCH_COORDINATE,
-                KeyboardView.NOT_A_TOUCH_COORDINATE);
+                KeyboardActionListener.NOT_A_TOUCH_COORDINATE,
+                KeyboardActionListener.NOT_A_TOUCH_COORDINATE);
         return true;
     }
 
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index e785eb76f3ee1d1f921ec08e4946b6c51ebfd184..28c5d73f02dc57d47a6603e54388e7f3e5b607ac 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1583,8 +1583,9 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
             LatinImeLogger.logOnManualSuggestion(
                     "", suggestion.toString(), index, suggestions.mWords);
             final char primaryCode = suggestion.charAt(0);
-            onCodeInput(primaryCode, new int[]{primaryCode}, KeyboardView.NOT_A_TOUCH_COORDINATE,
-                    KeyboardView.NOT_A_TOUCH_COORDINATE);
+            onCodeInput(primaryCode, new int[] { primaryCode },
+                    KeyboardActionListener.NOT_A_TOUCH_COORDINATE,
+                    KeyboardActionListener.NOT_A_TOUCH_COORDINATE);
             if (ic != null) {
                 ic.endBatchEdit();
             }