public boolean executeKeyEvent(KeyEvent event) {
        boolean handled = false;
        if (event.getAction() == KeyEvent.ACTION_DOWN) {
            switch (event.getKeyCode()) {
                case KeyEvent.KEYCODE_DPAD_LEFT:
                    handled = arrowScroll(FOCUS_LEFT);
                    break;
                case KeyEvent.KEYCODE_DPAD_RIGHT:
                    handled = arrowScroll(FOCUS_RIGHT);
                    break;
                case KeyEvent.KEYCODE_TAB:
                    if (Build.VERSION.SDK_INT >= 11) {
                        if (event.hasNoModifiers()) {
                            handled = this.arrowScroll(2);
                        } else if (event.hasModifiers(1)) {
                            handled = this.arrowScroll(1);
                        }
                    }
                    break;
            }
        }
        return handled;
    }
You can call this function yourself to have the scroll view perform
scrolling from a key event, just as if the event had been dispatched to
it by the view hierarchy.

@param event The key event to execute.
@return Return true if the event was handled, else false.
dkplayer-sample/src/main/java/xyz/doikki/dkplayer/widget/VerticalViewPager.java