def modif(res):
    """
    From a "Result" entry, get the modifier id string
    """
    if "@With" in res:
        if res["@With"] == "VK_NUMLOCK":
            return "numpad"
        if res["@With"] == "VK_SHIFT":
            return "shift"
        if res["@With"] == "VK_CONTROL VK_MENU":
            return "altgr"
        if res["@With"] == "VK_MENU":
            return "alt"
        return ""
    else:
        return "letter"