Skip to content
Permalink
Browse files

Added support for Bluetooth keyboards on iOS

In this case the keyboard is shown and immediately hidden, but we still want to accept text input
  • Loading branch information
slouken committed May 20, 2019
1 parent 582a3c9 commit a4e33b9cc45a0f40cbcd6ec80c3ab7c29fe99a5a

File 1 of 1 in a4e33b9

@@ -73,6 +73,7 @@ @implementation SDL_uikitviewcontroller {

#if SDL_IPHONE_KEYBOARD
UITextField *textField;
BOOL showingKeyboard;
BOOL rotatingOrientation;
NSString *changeText;
NSString *obligateForBackspace;
@@ -328,7 +329,9 @@ - (void)showKeyboard
{
keyboardVisible = YES;
if (textField.window) {
showingKeyboard = YES;
[textField becomeFirstResponder];
showingKeyboard = NO;
}
}

@@ -354,7 +357,7 @@ - (void)keyboardWillShow:(NSNotification *)notification

- (void)keyboardWillHide:(NSNotification *)notification
{
if (!rotatingOrientation) {
if (!showingKeyboard && !rotatingOrientation) {
SDL_StopTextInput();
}
[self setKeyboardHeight:0];

0 comments on commit a4e33b9

Please sign in to comment.