[Scummvm-devel] Keymapper questions.

Eugene Sandulenko sev at scummvm.org
Fri Feb 10 10:29:05 CET 2012


On 6 February 2012 08:23, Dan Serban <dserban at lodgingcompany.com> wrote:
> As I'm trying to dive into the keymapper code, I've come across some
> questions that I'm trying to have answered.  If at all possible, please
> keep in mind that I'm new and generally not very serious with my IRC'ing
> and messaging.
Sorry for the late reply.

> 1. When reading Eugene's notes about the future implementation of the
> keymapper, he mentions that a backend cannot know the existence of an
> engine.   This brought up a question:  what defines what a backend is?
> I asked on irc and was pointed to the doxygen docs
This is easy to define. On top of what Tarek said, it is everything
which lies inside of backend/. Currently for some backends like WinCE
there are hardcoded gameid used for determining which keymap to
choose. This considered as a dirty and ugly hack and has to be
addressed. The prime goal of keymapper was to get rid of that code.

This is why every engine should register with keymapper list of keys
it needs, while backend provides list of hardware keys/events it
generates. Then the keymapper does the job.

> 2. How are keysyms handled on non-hardware keys platforms such as
> android and ...
These are handled via Event structure. See Event struct and EventType
enum in common/events.h

> I will use lure and bass as my engines to test with, the changes will
> have to be approved by the developers responsible for those two
> engines.
Absolutely, and also consider writing some tutorials for future engines.


Eugene




More information about the Scummvm-devel mailing list