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

Make hotkeys strict and prevent default actions for handled ones #6070

Merged
merged 5 commits into from
Sep 20, 2024

Conversation

dmitrylyzo
Copy link
Contributor

This is a bit dirty fix. We should probably migrate to hotkeys-js or similar later.

I cherry-picked and squashed the commits from #5046, which is currently the master branch. I also rearranged these changes to make them smaller.

I didn't ignore modifiers in Emby* elements. In particular, in EmbySlider, because otherwise the browser started dragging the slider by itself.

I didn't ignore modifiers for Space and Enter because the latter seem to work ignoring them.

Changes

  • Prevent default actions for handled hotkeys.
  • Ignore modified hotkeys (Shift+, Alt+, Ctrl+, Meta+).
  • Tiny optimization in PDF player.
  • Migrate book readers to keydown to get actual modifiers.

Issues
Fixes #4908
Closes #5046
Fixes #5457

@dmitrylyzo dmitrylyzo added enhancement Improve existing functionality or small fixes ui & ux This PR or issue mainly concerns UI & UX labels Sep 13, 2024
@dmitrylyzo dmitrylyzo added this to the v10.10.0 milestone Sep 13, 2024
@dmitrylyzo dmitrylyzo requested a review from a team as a code owner September 13, 2024 23:33
Copy link

@jellyfin-bot
Copy link
Collaborator

Cloudflare Pages deployment

Latest commit 3025e9bf48cccc4479a54739e83627e67cd7b82b
Status ✅ Deployed!
Preview URL https://fa3972bc.jellyfin-web.pages.dev
Type 🔀 Preview

@dmitrylyzo dmitrylyzo changed the title Fix hotkeys Make hotkeys strict and prevent default actions for handled ones Sep 16, 2024
@thornbill thornbill merged commit 37c8370 into jellyfin:master Sep 20, 2024
12 checks passed
@dmitrylyzo dmitrylyzo deleted the fix-hotkeys branch September 20, 2024 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve existing functionality or small fixes ui & ux This PR or issue mainly concerns UI & UX
Projects
Status: Done
4 participants