fix action invocation
the previous code was wrong in that it would execute the first action it'd find, not the preferred one. we generally prefer press over toggle.
so. instead map the actions into a dict and then implement actual preference based on that