[Scummvm-devel] Keymapper questions.

Tarek Soliman tarek-spam at zeusmail.bounceme.net
Fri Feb 10 05:59:42 CET 2012


On Sun, Feb 05, 2012 at 10:23:46PM -0800, Dan Serban wrote:
> 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 my naive view of this:
Frontends are engines and things that deal with game data/scripts/assets.
Backends are things that contains platform-specific code.

> 2. How are keysyms handled on non-hardware keys platforms such as
> android

Here is my naive view of this:
Right now, the input for the keymapper is practically KeyState (keysym + mod). This means the backend code (e.g. the android backend code) would have to generate (fake) KeyStates inside (fake) key up/down events.
The output of the keymapper is Actions that could theoretically contain any Event but end up being key-centric events (and mouse clicks)
This is not good.

I am trying to turn it into a generic EventMapper that isn't key-centric. That way its input can for example be a GestureHardwareEvent and its output can be a AttackActionEvent.
-- 
Tarek




More information about the Scummvm-devel mailing list