[Scummvm-devel] ATTN Porters: Virtual Keyboard changes

D G Turner d.g.turner at ntlworld.com
Wed Jul 2 03:36:06 CEST 2014

  After a long discussion and many revisions, Pull Request #461 was
  merged three days ago before the v1.7.0 branch:

  The changes made are not very complex, but they have a wide impact
  Porters, especially those using the Virtual Keyboard or Event Mapper
  should reply to this message to indicate that they have checked the
  changes for their ports and retested with any problems noted.

  They should especially check the trigger for Virtual Keyboard and/or
  Event Mapper and the middle button behaviour for failure/conflicts.

  For those who have not followed this Pull Request:
These commits add the ability to open the virtual keyboard by holding
the middle mouse button for more than 1 second.

Though the virtual keyboard is not enabled by default on desktop ports,
it is useful for some users who want to use it on their own compiled
Win32/Linux builds, either as they want to use just a mouse/pointing
device or they have mobility issues making the use of a keyboard difficult.

This change removes the need for a hardware keyboard to press F7 to open
the virtual keyboard in these cases, which has seemed fairly silly as
the entire point of a virtual keyboard is to replace the hardware keyboard.

A survey of the game engines shows that the middle button is only used
in a small number of engines and even then it is rarely used i.e. used
in LURE to skip dialogues and in SCI to switch between walk and current
action. By making the virtual keyboard trigger, a long press of more
than 1sec to open this, it is very unlikely that this will cause any
conflict, even if the middle button is used.

There is also a small cleanup commit here to tidy up the warnings
emitted by the virtual keyboard if the pack is not present and prevent
this being "noisy" on the console.

Apart from these "headline" changes, this PR also makes three other
changes which have impact on various ports:

1. It has moved the trigger for virtual keyboard from bare F7 to
   CTRL-F7 and the trigger for the (WIP) event mapper from bare F8 to
   CTRL-F8 to reduce conflicts with game keys which have previously
   occurred. This had previously been vetoed due to the issues related
   to virtual keyboard usage by physically disabled gamers, but the
   middle button change avoids this issue.

   This impacts all ports using Virtual Keyboard or Event Mapper i.e.
   TIZEN, WII/GC, ANDROID at least.

2. It adds a "small" virtual keyboard pack as a quick solution for users
   who wanted a fixed 320x200 keyboard in all screen modes as the
   current virtual keyboard code is not configurable in this manner.

   This required no code changes, and can be safely omitted from
   packaging if the size causes problems for the small system ports.

   Currently, it has been added to all packaging rules where the default
   keyboard pack is already packaged i.e. MAEMO, WII, N64, LINUXMOTO,
   DINGUX, GPH (Caanoo/GP2X/GP2XWiz), Win32 via create_project and

   It is unclear how this is triggered to be packaged for POSIX and any
   other targets, but if this could be added, that would be optimal.

   If any of the small system porters do not want this packaged, then
   reverting the relevant commit should be sufficient... though some
   i.e. N64 which are limited to 320x200 anyway may want instead to
   keep the small pack instead of the default for memory saving, though
   a small code change or renaming would be necessary for this.

3. It switches a number of ports to calling the Virtual Keyboard event
   directly, rather than emulating the F7 (now CTRL-F7) key to make this
   clearer and avoid any future breakage.

   This impacts all ports using Virtual Keyboard or Event Mapper i.e.
   TIZEN at least.

   It should be noted that WII/GC and ANDROID should also be migrated,
   but instead these have currently just be fixed from F7 to CTRL-F7 as
   both of these ports have very complex keyboard event handling code
   which is unclear if it can be changed without breaking it.
   The WII/GC and Android port teams should look at this for master /
   v1.8.0git rather than v1.7.0pre unless they are very sure of the

Hopefully, no issues with this will be revealed, but it would be best to
catch these and fix before the v1.7.0 release if present.

David Turner

More information about the Scummvm-devel mailing list