You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|<kbd>Shift + H</kbd> |<kbd>Shift + H</kbd> |Enable pan mode|
96
+
|<kbd>Shift + V</kbd> |<kbd>Shift + V</kbd> |Enable text selection mode|
97
+
98
+
The current implementation of our PDF Viewer includes keyboard shortcuts for various functions like scrolling, zooming, text search, printing, and annotation deletion.
99
+
100
+
To enhance user experience, we're adding additional keyboard shortcuts for actions such as navigating between pages, accessing specific pages, toggling annotation tools, and displaying PDF elements like outlines, annotations, bookmarks, and thumbnails.
101
+
102
+
To support this, we're introducing a new class called **commandManager**, which handles custom commands triggered by specific key gestures. These custom commands will be defined by users and executed accordingly.
103
+
104
+
The **commandManager** will have a parameter called Commands, which will hold the collection of custom keyboard commands specified by users. Each custom command will be represented by a KeyboardCommand class, containing the `command name` and associated `keyboard combination`.
105
+
106
+
Additionally, we're introducing the **keyboardCustomCommands** parameter for the CommandManager, which will utilize the EventCallback to handle keyboard events and trigger appropriate methods when specific key combinations are pressed.
Each `keyboardCommand` object consists of a name property, specifying the `name` of the `custom command`, and a `gesture property`, defining the key gesture associated with the command.
194
+
195
+
For example, the first command named `customCopy` is associated with the **G** key and requires both the **Shift** and **Alt** modifier keys to be pressed simultaneously.
196
+
197
+
Additionally, there's an explanation of the key modifiers used in the gestures:
198
+
199
+
* Ctrl corresponds to the Control key, represented by the value `1`.
200
+
* Alt corresponds to the Alt key, represented by the value `2`.
201
+
* Shift corresponds to the Shift key, represented by the value `4`.
202
+
* Meta corresponds to the Command key on macOS or the Windows key on Windows, represented by the value `8`.
203
+
204
+
This setup allows users to perform custom actions within the PDF viewer by pressing specific key combinations, enhancing the user experience and providing more efficient navigation and interaction options.
0 commit comments