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

[Bug]: play/pause hotkey not working properly #3173

Closed
5 tasks done
rebelcode-xr opened this issue Feb 8, 2023 · 7 comments
Closed
5 tasks done

[Bug]: play/pause hotkey not working properly #3173

rebelcode-xr opened this issue Feb 8, 2023 · 7 comments
Labels
B: keyboard control B: usability bug Something isn't working U: duplicate This issue or pull request already exists

Comments

@rebelcode-xr
Copy link

Guidelines

  • I have encountered this bug in the latest release of FreeTube.
  • I have searched the issue tracker for open and closed issues that are similar to the bug report I want to file, without success.
  • I have searched the documentation for information that matches the description of the bug I want to file, without success.
  • This issue contains only one bug.

Describe the bug

  1. open a video
  2. I click with the mouse on the fullscreen button (important!)
  3. press spacebar to pause it
  4. instead of pausing the video the space disables the fullscreen
  5. if I press k (the other hotkey for play/pause) there's no effect

Expected Behavior

I expect the video to play/pause pressing space or k on my keyboard.

Issue Labels

keyboard control not working, usability issue

FreeTube Version

0.18.0

Operating System Version

Mac OS Monterey 12.6.3

Installation Method

.dmg

Primary API used

Local API

Last Known Working FreeTube Version (If Any)

No response

Additional Information

It seems that clicking on whatever UI button (fullscreen in the example) activates some accessibility function.
In fact if I press TAB a square appears and I can interact with the UI without the mouse, using space to simulate the "click".
image

That's why pressing space after click on whatever button doesn't have the expected behaviour.
In order to have space/k to play/pause I need to click on the video, then the hotkey works again.

Nightly Build

@rebelcode-xr rebelcode-xr added the bug Something isn't working label Feb 8, 2023
@efb4f5ff-1298-471a-8973-3d47447115dc

Can confirm that this is happening in the nightly builds

@absidue
Copy link
Member

absidue commented Feb 8, 2023

duplicate of #766 and #637

@github-actions github-actions bot added the U: duplicate This issue or pull request already exists label Feb 8, 2023
@absidue absidue closed this as not planned Won't fix, can't repro, duplicate, stale Feb 8, 2023
@efb4f5ff-1298-471a-8973-3d47447115dc

@absidue are u sure these issues are similar? I had the feeling that this wasn't the case in other versions. I did not verify this though

@absidue
Copy link
Member

absidue commented Feb 8, 2023

@efb4f5ff-1298-471a-8973-3d47447115dc the video.js buttons have always kept the focus, until you click or tab away, they made the decision to go the more accessible route.

@rebelcode-xr
Copy link
Author

rebelcode-xr commented Feb 9, 2023

duplicate of #766 and #637

I couldn't find those issues, sorry. So I was right that "space" acts also as a "click" when the focus is stolen.

Something that might be new in my issue:
The "k" hotkey should work all the time, but it doesn't: when the focus is on a button the "k" does nothing.
Would help also accessibility to have a key that always play/pause (normally is space).

@absidue
Copy link
Member

absidue commented Feb 9, 2023

The focus isn't stolen, it's standard web browser behaviour that if you click on a link or a button, it receives focus and keeps it until the focus is changed to something else, either by you, the code in the website or by the web browser if the focussed element no longer exists.

So when you click on the fullscreen button you activate it but also focus it.

Yes, quite a few things that act as buttons in FreeTube don't have that behaviour, but that is because they aren't actually buttons and we haven't written any code to replicate the standard behaviour, e.g. the refresh subscriptions button is an image that we've added a click trigger to.

Other players probably have to code to change the focussed element after you've clicked a button in them, video.js doesn't. We'll have to look into why pressing keys other than space and enter, doesn't reach our keyboard event handler, it's possible that video.js is swallowing the event before it reaches our code but I can't say for sure without looking into it.

@rebelcode-xr
Copy link
Author

Thank you for the explanation, hope you can find the issue! 😸

I was looking for an hotkey to reset the focus in order to create a rule in BetterTouchTool and override the current behaviour, but I couldn't find it.
The easiest temporary solution I found is to use "f" or "s" and avoid the UI buttons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B: keyboard control B: usability bug Something isn't working U: duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants