Hypersomnia
Hypersomnia copied to clipboard
Support for binding of key combos
Right now, the binding of keys to their corresponding commands is of the form:
using game_intent_map = augs::enum_map<
augs::event::keys::key,
game_intent_type
>;
Similarly for game_gui_intent_map
, app_intent_map
, app_ingame_intent_map
.
That means that each command can have only one associated key at most.
This proves at all insufficient for the variety of commands available in editor.
(By the way, we will also need to provide an editor_intent_map
).
We need some logic so that lets us bind e.g. a combo like Ctrl+F to a FIND command, or Ctrl+H to an OPEN_HISTORY command.
Proposed solution: Let the intent maps instead be of the form:
std::unordered_map<
std::vector<augs::event::keys::key>,
game_intent_type
>
(Note: augs::event::keys::key
represents any single keysym, like Left Shift
or k
.)
main.cpp
will need some modifications for this - whole input distribution happens there.