[Scummvm-tracker] [ScummVM :: Bugs] #15265: ANDROID: Please make virtual keyboard ESC not close the virtual keyboard

ScummVM :: Bugs trac at scummvm.org
Thu Jul 18 09:27:11 UTC 2024


#15265: ANDROID: Please make virtual keyboard ESC not close the virtual keyboard
-----------------------------+----------------------------
Reporter:  i30817            |       Owner:  (none)
    Type:  defect            |      Status:  new
Priority:  normal            |   Component:  Port: Android
 Version:                    |  Resolution:
Keywords:  android keyboard  |        Game:
-----------------------------+----------------------------
Comment (by antoniou79):

 There are a couple of different things mixed in your above post:

 Some widgets in the ScummVM GUI do have certain events attached to them
 that will show or hide the virtual keyboard (like a text field gaining
 focus (will show the virtual keyboard), an Esc or Return key while a text
 field is focused will hide the virtual keyboard) -- there's also some
 behavior for hiding the virtual keyboard when selecting an item from a
 list etc).

 Also while in-game, if the virtual keyboard is shown, calling for the
 ScummVM Global Menu will hide the virtual keyboard.

 And on the ScummVM launcher, the "Esc" key causes ScummVM to quit, if a
 text field is not in focus. If a text field is in focus, the Esc key will
 prioritize first losing the focus of the text field.

 Those are by design, part of the native ScummVM code, and not Android
 specific behavior.

 Searching the ScummVM source code for instances of:
 {{{
 g_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, true);
 }}}
 and
 {{{
 g_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false);
 }}}
 reveals other places (engine specific ones) that set the virtual keyboard
 as hidden or shown, on the native side of the code.

 Now, albeit those are not Android specific, the Android virtual keyboard
 *does not* pause an engine like the "native" ScummVM virtual keyboard does
 (that is by design and a good thing in my opinion), and that means that on
 Android you can keep watching a cutscene while the keyboard is shown. This
 exposes some issues that we may have not caught while testing on the main
 platforms (eg. Windows/Linux/Mac). Because, if during that cutscene or at
 the end of the cutscene, some event or engine specific action explicitly
 "orders" the keyboard to be hidden, then it will be hidden.

 This seems to be the case in the Tinsel engine in particular, too. If you
 are showing the keyboard when the game launches, it will be automatically
 hidden when the first intro cutscene ends. And it will keep doing that
 with subsequent cutscenes, without even pressing any key. Since Esc key
 does skip a cutscene, what happens is that it goes directly to the end of
 the cutscene and then the engine tells the keyboard to be hidden. Again,
 this is not Android specific, it's in the engine's code.

 The culprit seems to be in this particular case (Tinsel engine) the method
 Dialogs::killInventory(), which does explicitly hide the virtual keyboard,
 but it seems to be called from many places for, what I think is, making
 absolutely sure the inventory is not shown in various situations. And one
 of those places is at the end of cutscenes.
 https://github.com/scummvm/scummvm/blob/dbb1a6a014459c15c48fc386fdd3010816441ef8/engines/tinsel/dialogs.cpp#L3828
 https://github.com/scummvm/scummvm/blob/dbb1a6a014459c15c48fc386fdd3010816441ef8/engines/tinsel/scene.cpp#L393

 So, the keyboard gets hidden as a side effect of the engine being overly
 cautious hiding inventory screen.

 If this is considered a defect/bug/issue it should thus be specific for
 the TINSEL engine and probably be investigated and properly resolved by a
 developer familiar with the engine (ie. probably not me).

 In general, I'd say that the issue reported in this ticket is not Android-
 specific and, if a fix is required, it should be considered on a specific
 engine or game basis each time, where the issue appears.

 To clarify, as noted in my previous message, other engines and games won't
 hide the virtual keyboard when skipping cutscenes (with Esc or other key
 mapped to the skip action). A few examples of this, that I've quick-
 tested, are Blade Runner, Monkey Island 1, Indiana Jones and the Last
 Crusade, Indiana Jones and Fate of Atlantis). This is the expected
 behavior. You are able to just keep your finder on the "Esc" and skip
 cutscenes back to back.
-- 
Ticket URL: <https://bugs.scummvm.org/ticket/15265#comment:7>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list