Who 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
17:40 UTC
Read the original article
Hit count: 308
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