Skip to content

Hard Keyboard focus issue relating to Shortcuts list on Android 7.0/7.1.1 #43

Description

@BroadcastGames

PREFACE: I spent considerable time testing and validating this problem before reporting. It is reproducable on real hardware (Nexus 6 running Android 7.0 stock from Google) and in the Android SDK emulator (Android 7.1.1, the latest currently available). The emulator allows you to use your PC keyboard as a 'hard keyboard' and to turn off the on-screen 'soft keyboard'. Further, a typical mobile phone (Nexus 6) or tablet can have a USB or Bluetooth keyboard connected to be a 'hard keyboard'. The problem seems to be the same on real hardware or the emulator. This problem happens with the currently published Play Store version 0.9 of SOHP and with the current source code on Github compiled.

Problem: The default install has the "Shortcuts list" turned on. Somehow they steal focus away from the hard keyboard and it behaves different from the soft keyboard. Starting Z5 Adventure, for example, you type the first letter of a command then typing ceases to function until you touch the screen to put focus back on to the input box. If you start to type the story command "west" it is after the first letter "w" that the focus disappears. Once you restore focus, it seems to work fine for all the remaining characters that you type.

Further details:

  1. Going into SOHP preferences and turning off the "Shortcuts list" eliminates the problem. The focus stays on the input after typing the first letter and there seems to be identical (correct) behavior between a 'soft keyboard' and a 'hard keyboard'.

  2. With the "shortcut list" on a narrow screen device (5" phone in portrait mode) you can use the arrow left and right keys to confirm that the problem is that the focus is put on the Shortcuts list. You will see that they scroll in response to arrow keys as if you had changed focus with tab key or touch after typing the first letter of a command.

  3. I was able to modify the source code to have the Activity show the currently focused View and confirmed that it is indeed the Shortcut list that gets focus after typing one character.

I've looked at the source code and haven't been able to precisely identify why the focus changes after typing the first letter ("w" of "west"). It's a pretty odd bug in that it only changes focus on the 2nd character you type and the 1st and all others keystrokes work fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions