Skip to content

Instantly share code, notes, and snippets.

@jgouly
Last active June 25, 2016 13:34
Show Gist options
  • Save jgouly/6ad51f363cc4fb702f12380cc37496cb to your computer and use it in GitHub Desktop.
Save jgouly/6ad51f363cc4fb702f12380cc37496cb to your computer and use it in GitHub Desktop.
void handle_action(action_code a) {
bool should_process = true;
if (user_hook) {
should_process = user_hook(a);
}
if (should_process) {
switch(a) {
case NORMAL_KEY: ...
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment