Which code module should map physical keys to abstract keys?

Posted by Paul Manta on Game Development See other posts from Game Development or by Paul Manta
Published on 2011-12-04T21:46:07Z Indexed on 2012/03/21 23:41 UTC
Read the original article Hit count: 253

Filed under:
|

How do you bridge the gap between the library's low-level event system and your engine's high-level event system? (I'm not necessarily talking about key events, but also about quit events.)

At the top level of my event system, I send out KeyPressedEvents, KeyRelesedEvents and others of this kind. These high-level events only contain the abstract values of the keys (they don't say that Space way pressed, but that the JumpKey was pressed, for example).

Whose responsibility should it be to map the "JumpKey" to an actual key on the keyboard?

© Game Development or respective owner

Related posts about events

Related posts about keyboard