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

ESC & Backspace not working as expected on Mac due to QT buttons only sending "BACK" when CMD-[ is pressed. #832

Open
LeoUfimtsev opened this issue Jan 11, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@LeoUfimtsev
Copy link

LeoUfimtsev commented Jan 11, 2025

Describe the bug
On my Macbook (Intel) The ESC and Backspace do not perform a Back action as defined in the keyboard.json source file. Other keyboard buttons work (e.g. "F" to full screen, arrows).

I work as Software Engineer and used to do Open Source Development (I used to develop the SWT UI toolkit at Red Hat), but currently I'm just a user of Jellyfin. UI bugs tend to spark my curiosity. After spending over an hour researching on a Saturday & digging through source code and open issues in the repo, I concluded that this is most likely because QT framework does not send correct "ESC/Backspace" signals for "BACK". Instead it seems that QT Framework only sends BACK when you press "CMD-[" and "CMD-]" as indirectly referenced in the "ESC feature request" issue: #186.

Pressing CMD-[ & CMD-[ actually seems to work though.

QT Reference:
https://doc.qt.io/qt-5/qkeysequence.html#standard-shortcuts

Back | Alt+Left, Backspace | Ctrl+[ -- | -- | --

Expected behaviour
Pressing ESC or Backspace, "BACK" action is behaviour is initiated consistently across platforms including Mac. (I guess it works on Windows/Linux).

Actual Behaviour
Nothing occurs.

Using CMD-[ and CMD-] works for navigation and personally I have a functional workaround (see below); but from a usability perspective it's somewhat counter intuitive and requires you to hold the CMD button instead of a single button press like ESC/Backspace. It's also quite hard to figure out; there is no Keyboard cheat sheet and I couldn't find any documentation on this other than the issue mentioned above. Considering my GUI development background & willingness to spend like an hour on this, I think many Jellyfin users won't know about this nuance.

To Reproduce

  1. Jellyfin Server
  2. Jellyfin Media Client (Although also occurs in Web Client).
  3. Drill into a movie/tv show.
  4. Press ESC or BACKSPACE as per keyboard.json.

Workaround

  • I use a (paid) utility called BetterTouchTools on mac to remap ESC to CMD-[ when Jellyfin Media Player is active. Works for me.

Proposed solutions

  1. I could update the repository's readme (via pull request) and clarify that you need to use "cmd-[" to navigate. Not ideal, but something I could do myself if someone is willing to review.

  2. Update QT hooks. Seems like for apple, there is a file for InputAppleMediaKeys.h. Perhaps add a bit of code there and add the ESC and Backspace hook of sort. This is a bit too complicated for me to implement; I don't have familiar with QT/C++ and don't have Jellyfin setup for development; but if I were to implement myself; I would probably try to it something similar to that.

// Hypothetical sample code/idea. Not tested. Needs editing & integrating:
QAction* backAction = new QAction(tr("Back"), this);
backAction->setShortcut(QKeySequence(Qt::Key_Escape)); // Override the shortcut
connect(backAction, &QAction::triggered, this, &YourClass::handleBackAction);

Or maybe add some QT keyboard config file into jellyfin that overrides defaults.

  • I'd be willing to give 50$CAD to someone to fix this. (Paypal or Canadian interact) as a thank you note. (Or buy you a coffee with Banna bread from Starbucks if you live in Toronto, Canada).

Desktop (please complete the following information):

  • OS: OS X (Mac Mini, intel)
  • Version: 14.6.1 (OSX), 10.10.3 (Jellyfin server. Latest Media client)
  • Installation Method: DMG files downloaded from web.

Additional context

  • web-client vs media-player: I wasn't sure if I should post to media-player or the web client. Technically the keyboard.json seems to be defined in this repository, but you could make the case that ESC & Backspace are desired functionality in the Web client as well. Issue occurs in both. I can re-post issue there if you guys want.
@LeoUfimtsev LeoUfimtsev added the bug Something isn't working label Jan 11, 2025
@LeoUfimtsev LeoUfimtsev changed the title ESC & Backspace not working as expected on Mac due to QT button re-direct to CMD-[ ESC & Backspace not working as expected on Mac due to QT buttons only sending "BACK" when CMD-[ is pressed. Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

1 participant