diff --git a/java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityDelegate.java b/java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityDelegate.java
index c9270b88d6f0dafb13a7a97a3dc5b5de61c5012c..1ee586cce0188f774364b48d91f4e060371191a1 100644
--- a/java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityDelegate.java
+++ b/java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityDelegate.java
@@ -222,13 +222,23 @@ public class KeyboardAccessibilityDelegate<KV extends KeyboardView>
         // Make sure we're not getting an EXIT event because the user slid
         // off the keyboard area, then force a key press.
         if (key != null) {
-            simulateTouchEvent(MotionEvent.ACTION_DOWN, event);
-            simulateTouchEvent(MotionEvent.ACTION_UP, event);
+            onRegisterHoverKey(key, event);
             onHoverExitKey(key);
         }
         setLastHoverKey(null);
     }
 
+    /**
+     * Register a key that is selected by a hover event
+     *
+     * @param key A key to be registered.
+     * @param event A hover exit event that triggers key registering.
+     */
+    protected void onRegisterHoverKey(final Key key, final MotionEvent event) {
+        simulateTouchEvent(MotionEvent.ACTION_DOWN, event);
+        simulateTouchEvent(MotionEvent.ACTION_UP, event);
+    }
+
     /**
      * Simulating a touch event by injecting a synthesized touch event into {@link PointerTracker}.
      *