Driftwood2D / Driftwood

Driftwood 2D Tiling Game Engine and Development Suite
http://tileengine.org/
MIT License
24 stars 1 forks source link

Support keybinds which include a modifier key, or multiple keybinds per action. #156

Open seisatsu opened 7 years ago

seisatsu commented 7 years ago

For example, allow us to bind SHIFT + OTHER KEY to do an action. This will also let us rebind the Quit keybind which is currently hard-coded. As an aside, we should probably make the pause key not hard-coded at the same time.

This will involve allowing a keybind value such as "SDLK_LSHIFT+SDLK_UP", as well as making keybind values lists of strings instead of just strings.

pmer commented 7 years ago

What does it mean for an action to have multiple keybinds?

seisatsu commented 7 years ago

For example, left shift and right shift could both activate the same action.

pmer commented 7 years ago

If we expose the fact that we're using SDL to game authors then it'll cause trouble if we ever switch away from SDL in the future.

For instance, we might like to allow authors to say "LSHIFT+UP" instead of the SDL-specific "SDLK_LSHIFT+SDLK_UP".