Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for binding of key combos #256

Open
geneotech opened this issue Mar 6, 2018 · 1 comment
Open

Support for binding of key combos #256

geneotech opened this issue Mar 6, 2018 · 1 comment

Comments

@geneotech
Copy link
Member

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.

@geneotech
Copy link
Member Author

geneotech commented Mar 6, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant