VCL PDF Viewer: Supported Keystrokes
- 14 minutes to read
In addition to the available context menus and commands, the PDF Viewer control provides a set of keystrokes and key combinations allowing users to perform certain operations.
Single Keystrokes
Down Arrow
- Scrolls the current document view down by a preset number of pixels. If the PDF Viewer displays the bottom border of the last document page, pressing the Down Arrow key has no effect.
- In text selection mode, pressing the Down Arrow key moves the caret down to the next text string. If the string is not already visible, the document view is scrolled to display it. Pressing the Down Arrow key has no effect if the caret is within the document’s last text string.
- In addition to the effects listed above, pressing the Down Arrow key cancels the current text selection.
Up Arrow
- Scrolls the current document view up by a preset number of pixels. If the PDF Viewer displays the top border of the first document page, pressing the Up Arrow key has no effect.
- In text selection mode, pressing the Up Arrow key moves the caret up to the previous text string. If the string is not already visible, the document view is scrolled to display it. Pressing the Up Arrow key has no effect if the caret is within the first text string.
- In addition to the effects listed above, pressing the Up Arrow key cancels the current text selection.
Right Arrow
- Selects the next document page if the currently displayed page fits into the PDF Viewer’s area horizontally. In this mode, pressing the Right Arrow key produces the same effect as the PgDn key or a Ctrl+Down Arrow key combination.
- Scrolls the document view right by a preset number of pixels if the currently displayed page width exceeds the PDF Viewer’s width. If the right border of the selected page is already showing, pressing the Right Arrow key has no effect.
- Moves the caret one position to the right in the text selection mode. Pressing the Right Arrow key moves the caret to the beginning of the next string if the caret is at the end of the current text string. If that string is not currently visible, the document view is scrolled to display it. Pressing the Right Arrow key has no effect in this mode if the caret’s position is at the end of the last text string.
- In addition to the effects listed above, pressing the Right Arrow key cancels the current text selection.
Left Arrow
- Selects the previous document page if the currently displayed page fits into the PDF Viewer’s area horizontally. In this mode, pressing the Left Arrow key produces the same effect as the PgUp key or a Ctrl+Up Arrow key combination.
- Scrolls the document view left by a preset number of pixels if the currently displayed page width exceeds the PDF Viewer’s width. Pressing the Left Arrow key has no effect if the left border of the selected page is already showing.
- Moves the caret one position to the left in the text selection mode. Pressing the Left Arrow key moves the caret to the end of the previous string if the caret’s position is at the beginning of the current text string. If the string is not currently visible, the document view is scrolled to display it. Pressing the Left Arrow key has no effect if the caret’s position is at the beginning of the first string.
- In addition to the effects listed above, pressing the Left Arrow key cancels the current text selection.
Home
- Selects the first page in document navigation mode. The document view is scrolled to display the top border of the first page. If the first page is selected and its top border is not visible, pressing the Home key scrolls the document view to display the top border. Pressing the Home key has no effect if the first page is selected and its top border is visible.
- Places the caret at the beginning of the current text string in text selection mode. If the caret is at the start of a string, pressing the Home key has no effect.
- In addition to the effects listed above, pressing the Home key cancels the current text selection.
Pressing the Home key in document navigation mode is equivalent to executing the GoToFirstPage command, except that the command does not scroll the document view to display the first page’s top border if the page is visible.
End
Selects the last page in document navigation mode. The document view is scrolled to display the top border of the selected page. If the last page is selected and its bottom border is not visible, pressing the End key scrolls the document view to display the bottom border.
Places the caret at the end of the current text string in text selection mode. Pressing the End key has no effect if the caret is already at the end of a string.
In addition to the effects listed above, pressing the End key cancels the current text selection.
Pressing the End key in document navigation mode is equivalent to executing the GoToLastPage command, except that the command does not scroll the document view to display the last page’s bottom border if the page is visible.
Enter
Selects the next page. The document view is scrolled to display the top border of the selected page if it was not visible. If the last page is selected and its bottom border is not visible, pressing the Enter key scrolls the document view to display the bottom border.
Pressing the Enter key has no effect if the bottom border is visible.
Pressing the Enter key is equivalent to executing the GoToNextPage command, except that the command does not scroll the document view to display the last page’s bottom border if the page is already visible.
If the Search text box in the Find panel is focused, pressing the Enter key searches the next occurrence of the search string, similar to the F3 key.
Esc
Pressing the Esc key closes the currently displayed modal dialog (such as Open, Print, Document Properties, etc.), or hides the previously invoked Find panel.
If the PDF Viewer currently displays the Find panel without its context menu or modal dialogs, pressing the Esc key is equivalent to executing the Find command or calling the control’s HideFindPanel procedure.
F3
Invokes the Find panel and searches the next occurrence of the search string. Pressing the F3 key is similar to pressing the Enter key if the Search text box is focused.
Pressing the F3 key has no effect if the Find panel is already visible and the search string is empty.
General Key Combinations
Alt+Left Arrow
Navigates to the previous state in the loaded document’s view state history. Pressing the Alt+Left Arrow key combination has no effect if the current view state is the first in the history of view states.
Pressing this key combination is equivalent to executing the GoToPrevView command.
Alt+Right Arrow
Navigates to the next state in the loaded document’s view state history. Pressing the Alt+Right Arrow key combination has no effect if the current view state is the last in the history of view states.
Pressing this key combination is equivalent to executing the GoToNextView command.
Ctrl+End
Places the caret at the end of the document’s last text string. Pressing the Ctrl+End key combination has no effect if the caret is already at the end of the document.
Ctrl+F
Invokes the Find panel allowing end-users to search a specific text fragment within the currently loaded PDF document. Pressing the Ctrl+F key combination has no effect if the PDF Viewer control is empty or its OptionsFindPanel.DisplayMode property is set to fpdmAlways
or fpdmNever
.
Pressing this key combination is equivalent to executing the Find command or calling the control’s ShowFindPanel procedure when the Find panel is hidden. Unlike the command, the Ctrl+F key combination does not allow end-users to hide the Find panel. Pressing the Esc key hides the panel.
Ctrl+Home
Places the caret at the beginning of the document’s first text string. Pressing the Ctrl+Home key combination has no effect if the caret’s location is at the start of the document.
Ctrl+Left Arrow
Places the caret at the beginning of the nearest word located to the left of the caret’s current position. Pressing the Ctrl+Left Arrow key combination places the caret at the start of the word.
Pressing the Ctrl+Left Arrow key combination has an effect only when the caret is displayed.
Ctrl+Right Arrow
Places the caret at the beginning of the nearest word located to the right of the caret’s current position.
Pressing the Ctrl+Right Arrow key combination has an effect only when the caret is displayed.
Ctrl+Plus Sign(+)
Zooms the document view in by a preset value.
Pressing the Ctrl+Plus Sign(+) key combination is equivalent to executing the ZoomIn command.
Ctrl+Minus Sign(-)
Zooms the document view out by a preset value.
Pressing the Ctrl+Minus Sign(-) key combination is equivalent to executing the ZoomOut command.
Ctrl+Shift+Plus Sign(+)
Rotates the document view clockwise by 90
degrees.
Pressing the Ctrl+Shift+Plus Sign(+) key combination is equivalent to executing the RotateClockwise command.
Ctrl+Shift+Minus Sign(-)
Rotates the document view counterclockwise by 90
degrees.
Pressing the Ctrl+Add+Minus Sign(-) key combination is equivalent to executing the RotateCounterclockwise command.
Ctrl+Down Arrow / PgDn
Selects the next document page. Pressing the PgDn key or Ctrl+Down Arrow key combination scrolls the document view to display the next page. If the last page’s bottom border is not visible, pressing the PgDn key or Ctrl+Down Arrow key combination scrolls the document to display the bottom border. Otherwise, pressing either of these keystrokes has no effect.
Note that pressing the Right Arrow key produces the same effect if the currently displayed document page fits horizontally into the PDF Viewer’s area.
Pressing the PgDn key or Ctrl+Down Arrow key combination is equivalent to executing the GoToNextPage command, except that the command does not scroll the document view to display the page’s bottom border if the page is already visible.
Ctrl+Up Arrow / PgUp
Selects the previous document page. Pressing the PgUp key or Ctrl+Up Arrow key combination scrolls the document view to display the previous page. If the first page’s top border is not visible, pressing the PgUp or Ctrl+Up Arrow key combination scrolls the document to display the top border. Otherwise, pressing either of these keystrokes has no effect.
Note that pressing the Left Arrow key produces the same effect if the currently displayed document page fits horizontally into the PDF Viewer’s area.
Pressing the PgUp key or Ctrl+Up Arrow key combination is equivalent to executing the GoToPrevPage command, except that the command does not scroll the document view to display the page’s top border if the page is already visible.
Ctrl+A
Selects all text in the PDF document.
Pressing the Ctrl+A key combination is equivalent to executing the SelectAll command.
Ctrl+C
Copies the current text or image selection to the clipboard. This key combination is disabled if the content extraction operations are not allowed (that is, the PDF Viewer’s Document.AllowContentExtraction property returns False
).
Ctrl+P
Invokes the Print dialog. This key combination is disabled if:
Printing is forbidden in the loaded document (i.e., the PDF Viewer’s Document.AllowPrinting property returns
False
).The PDF Viewer is not associated with a component printer via the report link.
Pressing the Ctrl+P key combination is equivalent to executing the ShowPrintForm command.
Selection-Dependent Key Combinations
Ctrl+Shift+End
Expands the text selection to the end of the document provided that no text is selected or the caret is positioned at the right border of the text selection. Pressing the Ctrl+Shift+End key combination has no effect if the caret is at the end of the last string in the document.
Inverts the text selection from the caret’s current position to the end of the document if the caret is at the left border of the text selection.
Ctrl+Shift+Home
Expands the text selection to the beginning of the document provided that no text is selected or the caret is at the left border of the text selection. Pressing the Ctrl+Shift+Home key combination has no effect if the caret at the start of the first string in the document.
Inverts the text selection from the caret’s current position to the beginning of the document if the caret is positioned at the right border of the text selection.
Ctrl+Shift+Left Arrow
Expands the text selection to the beginning of the previous word provided that no text is selected or the caret is at the left border of the text selection. If the current word is the first in the string, pressing the Ctrl+Shift+Left Arrow key combination expands the text selection to the end of the previous string. If the string is not already visible, the document view is scrolled to display it. Pressing the key combination has no effect if the caret is at the beginning of the first text string in the document.
Shrinks the text selection by one word and places the caret at the start of the current or preceding word provided that the caret is at the right border of the text selection.
Ctrl+Shift+Right Arrow
Expands the text selection to the beginning of the next word provided that no text is selected or the caret is at the right border of the text selection. If the current word is the last in the string, pressing the Ctrl+Shift+Right Arrow key combination expands the text selection to the beginning of the next string. If the string is not already visible, the document view is scrolled to display it. Pressing the key combination has no effect if the caret is at the end of the last text string in the displayed PDF document.
Shrinks the text selection by one word and places the caret at the beginning of the next word provided that the caret is at the left border of the text selection.
Shift+Left Arrow
Moves the caret one position to the left while expanding the text selection by one character provided that no text is selected or the caret is at the left border of the text selection. If the caret’s current position corresponds to the beginning of a string, pressing the Shift+Left Arrow key combination expands the text selection to the end of the preceding string. If the string is not visible, the document view is scrolled to display it. Pressing the key combination has no effect if the caret is at the beginning of the first string.
Moves the caret left one position to the left while shrinking the text selection by one character provided that the caret is at the right border of the text selection.
Shift+Right Arrow
Moves the caret one position to the right while expanding the text selection by one character provided that no text is selected or the caret is at the right border of the text selection. If the caret’s current position corresponds to the end of a string, pressing the Shift+Right Arrow key combination expands the text selection to the beginning of the next string. If the string is not visible, the document view is scrolled to display it. Pressing the key combination has no effect if the caret is at the end of the last string.
Moves the caret one position to the right while shrinking the text selection by one character provided that the caret is at the left border of the text selection.
Shift+Up Arrow
Moves the caret up one position while expanding the text selection by one string provided that no text is selected or the caret is at the left border of the text selection. Pressing the Shift+Up Arrow key combination has no effect if the caret is on the first text string in the document.
Moves the caret up one position while shrinking the text selection by one string provided that the caret is at the right border of the text selection.
Shift+Down Arrow
Moves the caret down one position while expanding the text selection by one string provided that no text is selected or the caret is at the right border of the text selection. If the caret is already positioned at the last text string in the document, pressing the Shift+Down Arrow key combination has no effect.
Moves the caret down one position while shrinking the text selection by one string provided that the caret is at the left border of the text selection.