From 03f330ccff6de20ec30ba2c73037b91d55289707 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 5 Dec 2020 20:48:58 -0600 Subject: [PATCH] Fix keyboard input on tvOS Fixes #434 --- Limelight/Input/StreamView.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Limelight/Input/StreamView.m b/Limelight/Input/StreamView.m index f301060..36cdd89 100644 --- a/Limelight/Input/StreamView.m +++ b/Limelight/Input/StreamView.m @@ -104,6 +104,10 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5; if (settings.btMouseSupport) { [x1mouse start]; } + + // This is critical to ensure keyboard events are delivered to this + // StreamView and not our parent UIView, especially on tvOS. + [self becomeFirstResponder]; } - (void)startInteractionTimer { @@ -141,7 +145,6 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5; - (void) showOnScreenControls { #if !TARGET_OS_TV [onScreenControls show]; - [self becomeFirstResponder]; #endif }