[Scummvm-devel] Enabling Virtual Keyboard Support on Desktop Ports

D G Turner d.g.turner at ntlworld.com
Wed Apr 16 13:57:37 CEST 2014


Team,
  We have a request on the forums from a physically disabled ScummVM
  user to enable Virtual Keyboard support on the Win32 desktop port:
  http://forums.scummvm.org/viewtopic.php?t=13561

  As we want to accomodate disabled users as far as possible, I took
  a look at what was blocking this.

  As far as I can see, the feature was disabled as the F7 key to
  activate this conflicted with the usage of F7 in various engines,
  breaking the games.

  Specifically AGI, AGOS, CGE, GOB, HOPKINS, LURE, SAGA, SCUMM,
  SWORD25, TOLTECS, TONY and TSAGE use the F7 key.

  After testing with Lure which uses F7 for restore game, I found that
  enabling virtual keyboard with --enable-vkeybd prevents the engine
  from receiving the F7 event as this was unconditionally consumed by
  the default Event Mapper at common/EventMapper.cpp line 38.

  This occurs even if the Virtual Keyboard is disabled by the keyboard
  pack not being present i.e. vkeybd_default.zip

  To avoid this, I worked out that a simple solution is for the
  default Event Mapper to not "consume" the F7 event when triggering the
  Virtual Keyboard and committed this to master:

https://github.com/scummvm/scummvm/commit/8282298556bc9e5133996b90090ca41524ee86cf

  I have tested this with Lure and it now allows the virtual keyboard to
  be enabled by default without causing issues to "normal" users.

  The one remaining issue I can see is that there is a "noisy" warning
  which occurs on each F7 event of:
  "WARNING: Virtual keyboard not loaded!"

  This should be removed and the "startup" warning of:
  "WARNING: Keyboard pack not found!"
  expanded to be clearer i.e.
  "WARNING: Virtual keyboard disabled due to missing pack file!"

  This should be fairly simple to do.

  Apart from this, I am NOT intending for now to change the default
  at line 124 of configure to enable this for all ports.

  This should be safe on all the desktop ports with keyboards, but it
  is unclear if it could cause issues on the mobile and smaller ports,
  so a more conservative approach continuing what has already been done
  in configure is to enable this on each platform where the porter is
  happy.

  I am suggesting enabling this by:
  _vkeybd=yes;
  in the *mingw32* section of configure for Win32 initially for testing
  as per the current enables for Dingux, GC, Wii, PS3 etc.

  If we get no feedback of issues, we can look at whether we enable this
  more widely by default and disable for the platforms where we know
  this could cause an issue.

  I have spoken to our Win32 porter, Kirben on IRC and he seemed happy
  to enable unless there were major issues blocking this.

  So does anyone know of any blockers to this?
Thanks,
David Turner





More information about the Scummvm-devel mailing list