Skip to content

Conversation

@jcsepulvedar
Copy link

This commit fixes tablets with attached keyboard not registering input

Copy link
Member

@Bnyro Bnyro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me, keyboard events already work fine, so I don't see why these changes are needed?

Comment on lines +440 to +447
binding.player.apply {
isFocusable = true
isFocusableInTouchMode = true
requestFocus()
setOnKeyListener { _, keyCode, _ ->
onKeyUp(keyCode)
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In any case, this should be moved to CustomExoPlayerView.kt

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll look into it 👍

@jcsepulvedar
Copy link
Author

For me, keyboard events already work fine, so I don't see why these changes are needed?

On my and my wifes tablet (Lenovo Pro Tab 11 and Lenovo Pro Tab 12 respectivaly) is a hit or miss. Sometimes it pauses the video on the first try, then the focus automatically changes to a random element on screen without me tapping anywhere. So if I press spacebar again to resume the video most of the time it exits fullscreen and or plays the next video.
With my changes the focus does not go away. Have not had the time to follow up on your last comment sadly.

@Bnyro
Copy link
Member

Bnyro commented Dec 9, 2025

On my and my wifes tablet (Lenovo Pro Tab 11 and Lenovo Pro Tab 12 respectivaly) is a hit or miss. Sometimes it pauses the video on the first try, then the focus automatically changes to a random element on screen without me tapping anywhere. So if I press spacebar again to resume the video most of the time it exits fullscreen and or plays the next video.
With my changes the focus does not go away

Thanks for the explanation! (I'm not really using LibreTube with a keyboard, so I can't tell how it performs in the real world except from a short test)

In that case it definitely makes sense to include these changes. It'd be great if you could move the changes you made to the CustomExoPlayerView and test it again (no time pressure), then it's good to merge from my side.

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

Successfully merging this pull request may close these issues.

3 participants