Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using keyboard shortcut 'h' with PDF changes pointer to Hand Tool #201

Open
mattdricker opened this issue May 10, 2021 · 3 comments
Open

Comments

@mattdricker
Copy link
Contributor

mattdricker commented May 10, 2021

Reported by user: https://app.hubspot.com/contacts/6291320/ticket/405369758/

Describe the bug
When annotating a PDF, using the keyboard shortcut 'h' to create a highlight changes the pointer from the Text Selection Tool to the Hand Tool. This forces the user to manually change the pointer back to the Text Selection Tool to continue highlighting or annotating.

This only occurs using keyboard shortcut 'h'. Using 'a' does not alter the Text Selection Tool.

Note: This is most likely due to PDF.js also using the 'h' key for selecting the Hand Tool. The 's' key selects the Text Selection Tool.

To Reproduce
Steps to reproduce the behavior:

  1. Open a PDF in browser
  2. Activate Hypothesis extension or bookmarklet
  3. Select text, and type 'h' to create a highlight
  4. Note that the pointer tool changed from Text Selection to Hand Tool

Expected behavior
User should expect that the Text Selection Tool would remain unchanged after using 'h' to highlight.

Confirmed in Chrome 90 & Firefox 88, MacOS 11.3.1

@mattdricker
Copy link
Contributor Author

Here's a list of built-in PDF.js keyboard shortcuts: https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#faq-shortcuts

@robertknight
Copy link
Member

It might be OK to use the same shortcut that PDF.js uses for another purpose because it only applies when there is a text selection. We'd need to make sure that the default PDF.js shortcut is not invoked in that case.

It would be good to consider the alternatives as well.

@mkdir-washington-edu
Copy link
Contributor

Referenced here: hypothesis/product-backlog#1202

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants