diff --git a/java/src/com/android/inputmethod/keyboard/Keyboard.java b/java/src/com/android/inputmethod/keyboard/Keyboard.java
index d54acf7..fca8f56 100644
--- a/java/src/com/android/inputmethod/keyboard/Keyboard.java
+++ b/java/src/com/android/inputmethod/keyboard/Keyboard.java
@@ -197,14 +197,6 @@
         return null;
     }
 
-    // TODO: Remove this method.
-    public boolean isShiftedOrShiftLocked() {
-        // Alphabet mode have unshifted, manual shifted, automatic shifted, shift locked, and
-        // shift lock shifted element. So that unshifed element is the only one that is NOT in
-        // shifted or shift locked state.
-        return mId.isAlphabetKeyboard() && mId.mElementId != KeyboardId.ELEMENT_ALPHABET;
-    }
-
     public static boolean isLetterCode(int code) {
         return code >= MINIMUM_LETTER_CODE;
     }
diff --git a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
index 341d9bc..80a8c04 100644
--- a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
@@ -790,10 +790,6 @@
         return false;
     }
 
-    public boolean handleBack() {
-        return dismissMoreKeysPanel();
-    }
-
     @Override
     public void draw(Canvas c) {
         Utils.GCUtils.getInstance().reset();
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index ddf21f7..3c10c4e 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -40,7 +40,6 @@
 import android.util.Log;
 import android.util.PrintWriterPrinter;
 import android.util.Printer;
-import android.view.KeyEvent;
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.ViewGroup.LayoutParams;
@@ -1009,50 +1008,6 @@
         mKeyPreviewBackingView.setVisibility(isFullscreenMode() ? View.GONE : View.VISIBLE);
     }
 
-    @Override
-    public boolean onKeyDown(int keyCode, KeyEvent event) {
-        switch (keyCode) {
-        case KeyEvent.KEYCODE_BACK:
-            if (event.getRepeatCount() == 0) {
-                if (mSuggestionsView != null && mSuggestionsView.handleBack()) {
-                    return true;
-                }
-                final LatinKeyboardView keyboardView = mKeyboardSwitcher.getKeyboardView();
-                if (keyboardView != null && keyboardView.handleBack()) {
-                    return true;
-                }
-            }
-            break;
-        }
-        return super.onKeyDown(keyCode, event);
-    }
-
-    @Override
-    public boolean onKeyUp(int keyCode, KeyEvent event) {
-        switch (keyCode) {
-        case KeyEvent.KEYCODE_DPAD_DOWN:
-        case KeyEvent.KEYCODE_DPAD_UP:
-        case KeyEvent.KEYCODE_DPAD_LEFT:
-        case KeyEvent.KEYCODE_DPAD_RIGHT:
-            final LatinKeyboardView keyboardView = mKeyboardSwitcher.getKeyboardView();
-            final Keyboard keyboard = mKeyboardSwitcher.getKeyboard();
-            // Enable shift key and DPAD to do selections
-            if ((keyboardView != null && keyboardView.isShown())
-                    && (keyboard != null && keyboard.isShiftedOrShiftLocked())) {
-                KeyEvent newEvent = new KeyEvent(event.getDownTime(), event.getEventTime(),
-                        event.getAction(), event.getKeyCode(), event.getRepeatCount(),
-                        event.getDeviceId(), event.getScanCode(),
-                        KeyEvent.META_SHIFT_LEFT_ON | KeyEvent.META_SHIFT_ON);
-                final InputConnection ic = getCurrentInputConnection();
-                if (ic != null)
-                    ic.sendKeyEvent(newEvent);
-                return true;
-            }
-            break;
-        }
-        return super.onKeyUp(keyCode, event);
-    }
-
     // This will reset the whole input state to the starting state. It will clear
     // the composing word, reset the last composed word, tell the inputconnection
     // and the composingStateManager about it.
diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java
index 4e14104..a173713 100644
--- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java
+++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java
@@ -746,10 +746,6 @@
         return false;
     }
 
-    public boolean handleBack() {
-        return dismissMoreSuggestions();
-    }
-
     @Override
     public boolean onLongClick(View view) {
         return showMoreSuggestions();
