2.1.0 IPA ipadOS Bluetooth Keyboard Doesn’t Work

Subforum for discussion and help with ScummVM's iPhone port

Moderator: ScummVM Team

Post Reply
basis
Posts: 4
Joined: Sat May 27, 2017 2:28 pm

2.1.0 IPA ipadOS Bluetooth Keyboard Doesn’t Work

Post by basis » Sat Oct 26, 2019 4:19 pm

Hello,
I downloaded the official pre-built 2.1.0 IPA and signed and installed on ipadOS 13.1.3. The bluetooth keyboard works with the game filter on the SCUMMVM menu, but does not work in game. I also tried this with the smart connector keyboard from Apple.

I know there was some custom code that I had used in the past in the xcode build, but I’m trying to get away from that and just use the base IPA.

Any thoughts on how to make this work?

Thanks!

gmajor
Posts: 2
Joined: Tue Nov 05, 2019 2:30 am

Re: 2.1.0 IPA ipadOS Bluetooth Keyboard Doesn’t Work

Post by gmajor » Wed Nov 06, 2019 11:35 pm

You need to put your device in portrait mode in order for the external keyboard to work. This is a long standing issue that I hoped would be fixed in the 2.1.0 release but unfortunately it's not.

User avatar
criezy
ScummVM Developer
Posts: 640
Joined: Sat Sep 23, 2006 10:41 am
Location: West Sussex, UK

Re: 2.1.0 IPA ipadOS Bluetooth Keyboard Doesn’t Work

Post by criezy » Thu Nov 07, 2019 12:14 am

And I see we even have a bug report for that one, but somehow I missed it when doing some work on the keyboard handling earlier this year and checking the reported bugs. I will try to take a look this weekend.

basis
Posts: 4
Joined: Sat May 27, 2017 2:28 pm

Re: 2.1.0 IPA ipadOS Bluetooth Keyboard Doesn’t Work

Post by basis » Tue Nov 12, 2019 2:12 am

thanks - please let me know when to test. I found the old code that worked for me when I manually added to a local code base. Is this only required for smart keyboard on iPad pro vs standard bluetooth? Maybe this is two separate fixes.

viewtopic.php?t=14524

User avatar
criezy
ScummVM Developer
Posts: 640
Joined: Sat Sep 23, 2006 10:41 am
Location: West Sussex, UK

Re: 2.1.0 IPA ipadOS Bluetooth Keyboard Doesn’t Work

Post by criezy » Tue Nov 12, 2019 8:44 pm

I had a look this weekend and the good news is that we actually somewhat already fixed this (and I somehow forgot that we had :-P ). It would be complicated to enable by default the external keyboard in landscape mode, but you can now (in version 2.1.0) enable it using the pinch in gesture. I have tested this with my bluetooth keyboard and King's Quest 1, and this works well (at least for the arrow keys and the parser input).

To give a bit more details, the issue is that when we enable text input, if there is no external keyboard connected this shows the virtual keyboard. And there is unfortunately no public API on iOS to detect the presence of an external keyboard so that we could enable text input in landscape mode if there is one, and not enable it when there is none. The code in the thread you linked to has actually already been added to ScummVM, but it broke the experience when no external keyboard is connected as then the virtual keyboard was always visible in landscape mode. So further changes have been made to disable by default text input in landscape mode and add gestures to enable/disable text input (the pinch in/out gestures) so that this can be done manually. We could implement a number of horrible hacks to try to detect the presence of an external keyboard despite the lack of public API, but the current situation seems good enough for me.

Note that when an external keyboard is connected, enabling text input will not show the virtual keyboard, but will still show the input assistant bar (with the copy and paste buttons). Fortunately this is small enough to not get in the way. There is some code to remove that bar as well, but the code is not included by default as it breaks the build with older iOS versions. The code for that is on lines 55-57 in ios7_keyboard.mm. If you really want to hide this bar when the keyboard is enabled, you can uncomment those lines and compile ScummVM.

basis
Posts: 4
Joined: Sat May 27, 2017 2:28 pm

Re: 2.1.0 IPA ipadOS Bluetooth Keyboard Doesn’t Work

Post by basis » Tue Nov 12, 2019 11:46 pm

Thanks! I confirmed that the pinch works well with an iPad Pro 12.9” with the smart connector keyboard. The little bar is annoying, but at least the keyboard works with the pre-compiled IPAs (I’m trying to avoid using xcode). Maybe in a future version we can get a checkbox in the settings to disable this for newer devices (not sure if this breaks the compatibility or not).

Thanks again!

gmajor
Posts: 2
Joined: Tue Nov 05, 2019 2:30 am

Re: 2.1.0 IPA ipadOS Bluetooth Keyboard Doesn’t Work

Post by gmajor » Thu Nov 14, 2019 12:01 am

Awesome! I didn't know about the pinch gesture trick. Thanks!

Post Reply