def get_combination_action(combination):
    """
    Prepares the action for a keyboard combination, also filters another
    "strange" actions declared by the user.
    """
    accepted_actions = ('link', 'js')
    for action in accepted_actions:
        if action in combination:
            return {action: combination[action]}
    return {}
def get_combination_action ( combination ) : accepted_actions = ( 'link' , 'js' ) for action in accepted_actions : if action in combination : return { action : combination [ action ] } return { }
Prepares the action for a keyboard combination, also filters another
    "strange" actions declared by the user.