[Scummvm-tracker] [ScummVM :: Bugs] #12942: Apple keyboard cursor keys don't work, accessibility bar covers bottom of screen

ScummVM :: Bugs trac at scummvm.org
Sat Sep 25 00:05:37 UTC 2021


#12942: Apple keyboard cursor keys don't work, accessibility bar covers bottom of
screen
-------------------------------------+------------------------
Reporter:  Purduecoz                 |       Owner:  (none)
    Type:  defect                    |      Status:  new
Priority:  high                      |   Component:  Port: iOS
 Version:                            |  Resolution:
Keywords:  iOS 15, keyboard, cursor  |        Game:
-------------------------------------+------------------------
Comment (by criezy):

 Thank you for the additional information.
 So the bar you see is actually the input assistant bar. It contains by
 default copy/paste buttons, auto correction and predictive text. In
 ScummVM we try to remove all of those so that the bar is not visible.

 Setting the autocorrection to `UITextAutocorrectionTypeNo` used to disable
 both the autocorrection and predictive text. But apparently that is no
 longer the case in iOS 15. I don't know if the change was done on purpose
 or if this is a bug in iOS 15, and I can't find anything new in the Apple
 developer documentation that could be used to disable the predictive text
 from an application. But at least, as you found, there is a workaround as
 the user can disable predictive text in the iOS keyboard settings.

 I suspect the arrow keys issue is related to the new
 `wantsPriorityOverSystemBehavior` property for a `UIKeyCommand` that was
 added in iOS 15. To test this theory can you please edit
 `backends/platform/ios7/ios7_keyboard.mm` to have the following code and
 see if that fixes the issue for you?
 The code starts around line 150.
 {{{#!diff
 --- old/backends/platform/ios7/ios7_keyboard.mm
 +++ new/backends/platform/ios7/ios7_keyboard.mm
 @@ -148,9 +148,13 @@ - (void)detachAccessoryView {

  - (NSArray *)keyCommands {
         UIKeyCommand *upArrow = [UIKeyCommand keyCommandWithInput:
 UIKeyInputUpArrow modifierFlags: 0 action: @selector(upArrow:)];
 +       upArow.wantsPriorityOverSystemBehavior = YES;
         UIKeyCommand *downArrow = [UIKeyCommand keyCommandWithInput:
 UIKeyInputDownArrow modifierFlags: 0 action: @selector(downArrow:)];
 +       downArrow.wantsPriorityOverSystemBehavior = YES;
         UIKeyCommand *leftArrow = [UIKeyCommand keyCommandWithInput:
 UIKeyInputLeftArrow modifierFlags: 0 action: @selector(leftArrow:)];
 +       leftArrow.wantsPriorityOverSystemBehavior = YES;
         UIKeyCommand *rightArrow = [UIKeyCommand keyCommandWithInput:
 UIKeyInputRightArrow modifierFlags: 0 action: @selector(rightArrow:)];
 +       rightArrow.wantsPriorityOverSystemBehavior = YES;
         UIKeyCommand *escapeKey = [UIKeyCommand keyCommandWithInput:
 UIKeyInputEscape modifierFlags: 0 action: @selector(escapeKey:)];
         return [[NSArray alloc] initWithObjects: upArrow, downArrow,
 leftArrow, rightArrow, escapeKey, nil];
  }
 }}}



 Mapping the ` key to Escape has indeed been in place for a long time so
 that when using either the virtual keyboard or a physical keyboard without
 the Escape key it was possible to type Escape. I still think it could be a
 good idea to add an option so that the user can enable our custom input
 accessory bar even when using a physical keyboard. Many DOS games used
 functions keys for example for loading or saving, so having access to
 those can be required for some games. So I might look into that as well.
-- 
Ticket URL: <https://bugs.scummvm.org/ticket/12942#comment:8>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list