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

Override pdf.js to enable VIM-like scrolling by j, k, J, K, H, L #4119

Merged
merged 8 commits into from
Jan 2, 2024

Conversation

taquangtrung
Copy link
Contributor

Hi,

I override some default keys of pdf.js to enable a VIM-like scrolling experience:

  • j, k for a small vertical scrolls like VIM (by default in pdf.js, j, k will scroll pages)
  • J, K now scroll pages
  • H, L for small horizontal scrolls (I didn't assign to h since it is used by pdf.js to select the hand tool).

Can you consider merging this PR?

Thanks!

@James-Yu
Copy link
Owner

James-Yu commented Jan 2, 2024

I've modified your PR a bit:

  • Instead of changing the default behavior of j and k, I'd rather suggest adding new shortcuts shift+jkhl for small navigations to avoid changing current behavior.
  • The previous implementation is verbose.

@James-Yu James-Yu merged commit e9da179 into James-Yu:master Jan 2, 2024
6 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants