def translate_modifier(key):
    if ((key == Key.ctrl_l) or (key == Key.ctrl_r)):
        return Key.ctrl
    if ((key == Key.alt_l) or (key == Key.alt_r)):
        return Key.alt
    if ((key == Key.shift_l) or (key == Key.shift_r)):
        return Key.shift
    return key
def translate_modifier(key):
    if ((key == Key.ctrl_l) or (key == Key.ctrl_r)):
        return Key.ctrl
    if ((key == Key.alt_l) or (key == Key.alt_r)):
        return Key.alt
    if ((key == Key.shift_l) or (key == Key.shift_r)):
        return Key.shift
    return key