def on_press(key):
    print(key)
    if (key != Key.enter):
        if (translate_modifier(key) in ALL_MODIFIERS):
            active_modifiers.add(key)
        return
    for key_binding in ALL_KEY_BINDINGS:
        if (len(key_binding.modifiers) != len(active_modifiers)):
            continue
        all_modifiers_found = True
        for modifier in key_binding.modifiers:
            modifier_found = False
            for active_modifier in active_modifiers:
                if (translate_modifier(active_modifier) == modifier):
                    modifier_found = True
            if (not modifier_found):
                all_modifiers_found = False
                break
        if all_modifiers_found:
            main.handle_massivization(key_binding.massivizer)
            return
def on_press(key):
    print(key)
    if (key != Key.enter):
        if (translate_modifier(key) in ALL_MODIFIERS):
            active_modifiers.add(key)
        return
    for key_binding in ALL_KEY_BINDINGS:
        if (len(key_binding.modifiers) != len(active_modifiers)):
            continue
        all_modifiers_found = True
        for modifier in key_binding.modifiers:
            modifier_found = False
            for active_modifier in active_modifiers:
                if (translate_modifier(active_modifier) == modifier):
                    modifier_found = True
            if (not modifier_found):
                all_modifiers_found = False
                break
        if all_modifiers_found:
            main.handle_massivization(key_binding.massivizer)
            return