public class

ShortcutHelper

extends Object
java.lang.Object
   ↳ com.pdftron.pdf.utils.ShortcutHelper

Class Overview

A helper class for keyboard shortcuts

Summary

Public Constructors
ShortcutHelper()
Public Methods
static boolean canHandleShortcut(ToolManager toolManager, int keyCode, KeyEvent event)
static void enable(boolean enabled)
Enables/Disables keyboard shortcuts
static DefaultToolbars.ButtonId getButtonId(ToolManager toolManager, int keyCode, KeyEvent event)
static boolean isAddBookmark(int keyCode, KeyEvent event)
static boolean isArrowAnnot(int keyCode, KeyEvent event)
static boolean isCancelTool(int keyCode, KeyEvent event)
static boolean isCloseApp(int keyCode, KeyEvent event)
static boolean isCloseMenu(int keyCode, KeyEvent event)
static boolean isCloseTab(int keyCode, KeyEvent event)
static boolean isCommentAnnot(int keyCode, KeyEvent event)
static boolean isCommitDraw(int keyCode, KeyEvent event)
static boolean isCommitText(int keyCode, KeyEvent event)
static boolean isCopy(int keyCode, KeyEvent event)
static boolean isCut(int keyCode, KeyEvent event)
static boolean isDeleteAnnot(int keyCode, KeyEvent event)
static boolean isDrawAnnot(int keyCode, KeyEvent event)
static boolean isEnabled()
static boolean isEraseInk(int keyCode, KeyEvent event)
static boolean isEraserAnnot(int keyCode, KeyEvent event)
static boolean isFind(int keyCode, KeyEvent event)
static boolean isGotoFirstPage(int keyCode, KeyEvent event)
static boolean isGotoLastPage(int keyCode, KeyEvent event)
static boolean isGotoNextDoc(int keyCode, KeyEvent event)
static boolean isGotoNextSearch(int keyCode, KeyEvent event)
static boolean isGotoPreviousDoc(int keyCode, KeyEvent event)
static boolean isGotoPreviousSearch(int keyCode, KeyEvent event)
static boolean isHighlightAnnot(int keyCode, KeyEvent event)
static boolean isHyperlinkAnnot(int keyCode, KeyEvent event)
static boolean isImageAnnot(int keyCode, KeyEvent event)
static boolean isJumpPageBack(int keyCode, KeyEvent event)
static boolean isJumpPageForward(int keyCode, KeyEvent event)
static boolean isLineAnnot(int keyCode, KeyEvent event)
static boolean isLongPress(MotionEvent event)
static boolean isOpenDrawer(int keyCode, KeyEvent event)
static boolean isOvalAnnot(int keyCode, KeyEvent event)
static boolean isPageDown(int keyCode, KeyEvent event)
static boolean isPageUp(int keyCode, KeyEvent event)
static boolean isPaste(int keyCode, KeyEvent event)
static boolean isPrint(int keyCode, KeyEvent event)
static boolean isRectangleAnnot(int keyCode, KeyEvent event)
static boolean isRedo(int keyCode, KeyEvent event)
static boolean isResetZoom(int keyCode, KeyEvent event)
static boolean isRotateClockwise(int keyCode, KeyEvent event)
static boolean isRotateCounterClockwise(int keyCode, KeyEvent event)
static boolean isScroll(MotionEvent event)
static boolean isScrollToDown(int keyCode, KeyEvent event)
static boolean isScrollToLeft(int keyCode, KeyEvent event)
static boolean isScrollToRight(int keyCode, KeyEvent event)
static boolean isScrollToUp(int keyCode, KeyEvent event)
static boolean isSignatureAnnot(int keyCode, KeyEvent event)
static boolean isSquigglyAnnot(int keyCode, KeyEvent event)
static boolean isStartEdit(int keyCode, KeyEvent event)
static boolean isStrikethroughAnnot(int keyCode, KeyEvent event)
static boolean isSwitchForm(int keyCode, KeyEvent event)
static boolean isSwitchInk(int keyCode, KeyEvent event)
static boolean isTextSelect(MotionEvent event)
static boolean isTextboxAnnot(int keyCode, KeyEvent event)
static boolean isUnderlineAnnot(int keyCode, KeyEvent event)
static boolean isUndo(int keyCode, KeyEvent event)
static boolean isZoomIn(MotionEvent event)
static boolean isZoomIn(int keyCode, KeyEvent event)
static boolean isZoomInOut(MotionEvent event)
static boolean isZoomOut(int keyCode, KeyEvent event)
static boolean isZoomOut(MotionEvent event)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ShortcutHelper ()

Public Methods

public static boolean canHandleShortcut (ToolManager toolManager, int keyCode, KeyEvent event)

public static void enable (boolean enabled)

Enables/Disables keyboard shortcuts

Parameters
enabled True if enabled

public static DefaultToolbars.ButtonId getButtonId (ToolManager toolManager, int keyCode, KeyEvent event)

public static boolean isAddBookmark (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers adding a user bookmark

public static boolean isArrowAnnot (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers arrow annotation

public static boolean isCancelTool (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the key event triggers canceling the current tool

public static boolean isCloseApp (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the key event triggers closing the app

public static boolean isCloseMenu (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the key event triggers closing the current menu

public static boolean isCloseTab (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the key event triggers closing the current tab

public static boolean isCommentAnnot (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers comment/note annotation

public static boolean isCommitDraw (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the key event triggers committing the current draw

public static boolean isCommitText (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the key event triggers committing the current text

public static boolean isCopy (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers copy

public static boolean isCut (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers cut

public static boolean isDeleteAnnot (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers deleting the selected annotation

public static boolean isDrawAnnot (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers draw/pen/freehand annotation

public static boolean isEnabled ()

Returns
  • True if keyboard shortcuts is handled

public static boolean isEraseInk (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the key event triggers erase ink

public static boolean isEraserAnnot (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers eraser annotation

public static boolean isFind (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers finding text

public static boolean isGotoFirstPage (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers going to the first page

public static boolean isGotoLastPage (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers going to the last page

public static boolean isGotoNextDoc (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers going to the next document

public static boolean isGotoNextSearch (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers going to the next search result

public static boolean isGotoPreviousDoc (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers going to the previous document

public static boolean isGotoPreviousSearch (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers going to the previous search result

public static boolean isHighlightAnnot (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers highlight annotation

public static boolean isHyperlinkAnnot (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers hyper link annotation

public static boolean isImageAnnot (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers image annotation

public static boolean isJumpPageBack (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers jumping back to the page in the stack

public static boolean isJumpPageForward (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers jumping forward to the page in the stack

public static boolean isLineAnnot (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers line annotation

public static boolean isLongPress (MotionEvent event)

Parameters
event The motion event
Returns
  • True if the motion event triggers long press

public static boolean isOpenDrawer (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the key event triggers opening the drawer

public static boolean isOvalAnnot (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers oval annotation

public static boolean isPageDown (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers jumping towards the down in the page

public static boolean isPageUp (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers jumping towards the up in the page

public static boolean isPaste (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers paste

public static boolean isPrint (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers print

public static boolean isRectangleAnnot (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers rectangle annotation

public static boolean isRedo (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers redo

public static boolean isResetZoom (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the motion event triggers resetting zoom

public static boolean isRotateClockwise (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers rotating clockwise

public static boolean isRotateCounterClockwise (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers rotating counter-clockwise

public static boolean isScroll (MotionEvent event)

Parameters
event The motion event
Returns
  • True if the motion event triggers scroll

public static boolean isScrollToDown (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers scrolling to the down

public static boolean isScrollToLeft (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers scrolling to the left

public static boolean isScrollToRight (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers scrolling to the right

public static boolean isScrollToUp (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers scrolling to the up

public static boolean isSignatureAnnot (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers signature annotation

public static boolean isSquigglyAnnot (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers squiggly annotation

public static boolean isStartEdit (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers starting edit the selected annotation

public static boolean isStrikethroughAnnot (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers strikethrough/crossing-out annotation

public static boolean isSwitchForm (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers switching to the next form

public static boolean isSwitchInk (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the key event triggers switching to the next ink

public static boolean isTextSelect (MotionEvent event)

Parameters
event The motion event
Returns
  • True if the motion event triggers selecting text

public static boolean isTextboxAnnot (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers text box annotation

public static boolean isUnderlineAnnot (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers underline annotation

public static boolean isUndo (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers undo

public static boolean isZoomIn (MotionEvent event)

Parameters
event The motion event
Returns
  • True if the motion event triggers zoom in

public static boolean isZoomIn (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers zoom in

public static boolean isZoomInOut (MotionEvent event)

Parameters
event The motion event
Returns
  • True if the motion event triggers zoom in/out

public static boolean isZoomOut (int keyCode, KeyEvent event)

Parameters
keyCode The key code
event The key event
Returns
  • True if the pressed key triggers zoom out

public static boolean isZoomOut (MotionEvent event)

Parameters
event The motion event
Returns
  • True if the motion event triggers zoom out