def rule(event):
    if all(
        [
            "\\Control\\Keyboard Layouts\\" in event.deep_get("TargetObject", default=""),
            "Ime File" in event.deep_get("TargetObject", default=""),
            not event.deep_get("Details", default="").endswith(".ime"),
        ]
    ):
        return True
    return False
