[Scummvm-devel] Simplifying keyboard repeat

Marcus Comstedt marcus at mc.pp.se
Fri May 19 03:17:04 CEST 2006

Max Horn <max at quendi.de> writes:

> Now, the other topic Marcus brought up are keyboard shortcuts. Well,
> I am not convinced that "sharing" code there is that useful. I just
> wrote a looong three paragraphs about it, but now decided to delete
> them, and instead ask this: Marcus, could you give a list of all
> hotkeys that you think should be shared, and state which ports would
> share them? So far, after looking through all backends, the only
> example I could come up with what precisely yours: Ctrl-A seems
> useful for both SDL and DC (and *maybe* PalmOS).

I will give you such a list in the form of set comprehension:

L = { key | key is presented to the user as available by
            platform independent code }


The SCUMM help text for example lists Ctrl 0-9, Alt 0-9, Alt x, Ctrl
z, Alt Enter, Ctrl d, Ctrl s, Ctrl f, Ctrl g, Ctrl m, Ctrl Alt 1-8,
Ctrl Alt +, Ctrl Alt - and Ctrl a.  Yet only a few of these are
implemented by the SCUMM engine itself.  In some cases it might of
course make more sense to adjust L by removing the documentation when
it is not applicable.

> Convince me that adding a whole generic hotkey sharing infrastructure
> would save us more work than adding three lines to the DC backend to
> implement Ctrl-A, and we can discuss it for real :-).

Well, if Ctrl a is implemented by the engine(s), that's fine too.
You could add the three lines there, and no new infrastructure is
needed.  This would also allow different engines to use different
hotkeys, to avoid collisions with keys the game might use.

  // Marcus

More information about the Scummvm-devel mailing list