Trackpad and Mouse Support
PSPDFKit provides built-in support for input from an indirect pointer (trackpad or mouse) on iPad and Mac Catalyst. We recommend enabling
UIApplicationSupportsIndirectInputEvents in your app’s
Info.plist to enhance some functionality.
PSPDFKit incorporates hover effects for:
Text on PDF pages
The resizing knobs on selected annotations
Rows of buttons using
PSPDFToolbar(including the annotation toolbar and the Document Editor toolbar)
Document tabs using
And many other parts of the UI
Read more about this implementation in our Supporting Pointer Interactions blog post.
All scrollable areas in PSPDFKit may be scrolled using the standard scroll mechanism of the input device (for example, with a mouse wheel or with two-finger scrolling on a trackpad). Users with a vertical mouse wheel can scroll horizontally by holding shift on a hardware keyboard. (This is a standard feature on iOS and macOS.)
Where appropriate, PSPDFKit uses system contextual menus and responds to secondary clicks. If
UIApplicationSupportsIndirectInputEvents is enabled in your app’s
Info.plist, it will be possible to reset color presets in the annotation inspector by secondary clicking. Without this, users will need to long click.
You can read more about the ideas behind our approach and get some ideas for your own pointer device implementation in our Level Up Your Trackpad Support Using
UIInteraction blog post.