Commit 343612480413cc38813ac0694cdf4f23404c806f

Sam Lantinga 2023-08-01T20:38:45

Revert "Stop beep when running iOS apps on ARM-based Macs" This reverts commit bbf38bbbc334bc0ee90d3eec228a968d8fc1689e, which prevented text input from working when a hardware keyboard was connected, since key strokes don't get to the text input field. Fixes https://github.com/libsdl-org/SDL/issues/7958 (cherry picked from commit f5ea6ae18d860796184b9b31a2005957cb7e30a2) (cherry picked from commit 5e9320f6b5f4492fea026f1d9c14a4b9787f7a22)

diff --git a/src/video/uikit/SDL_uikitview.m b/src/video/uikit/SDL_uikitview.m
index a862273..c358648 100644
--- a/src/video/uikit/SDL_uikitview.m
+++ b/src/video/uikit/SDL_uikitview.m
@@ -412,6 +412,7 @@ extern int SDL_AppleTVRemoteOpenedAsJoystick;
             SDL_SendKeyboardKey(SDL_PRESSED, scancode);
         }
     }
+    [super pressesBegan:presses withEvent:event];
 }
 
 - (void)pressesEnded:(NSSet<UIPress *> *)presses withEvent:(UIPressesEvent *)event
@@ -422,6 +423,7 @@ extern int SDL_AppleTVRemoteOpenedAsJoystick;
             SDL_SendKeyboardKey(SDL_RELEASED, scancode);
         }
     }
+    [super pressesEnded:presses withEvent:event];
 }
 
 - (void)pressesCancelled:(NSSet<UIPress *> *)presses withEvent:(UIPressesEvent *)event
@@ -432,11 +434,13 @@ extern int SDL_AppleTVRemoteOpenedAsJoystick;
             SDL_SendKeyboardKey(SDL_RELEASED, scancode);
         }
     }
+    [super pressesCancelled:presses withEvent:event];
 }
 
 - (void)pressesChanged:(NSSet<UIPress *> *)presses withEvent:(UIPressesEvent *)event
 {
     /* This is only called when the force of a press changes. */
+    [super pressesChanged:presses withEvent:event];
 }
 
 #endif /* TARGET_OS_TV || defined(__IPHONE_9_1) */