def shortcut_entry(title, accel=None, gesture=None, **kwargs):
    props = { "title": title, "visible": 1, }
    if accel:
        props["accelerator"] = accel
    if gesture:
        props["shortcut-type"] = gesture
    props.update(kwargs)
    entry = {
            "klass": "Shortcut",
            "properties": props,
            }
    return entry