def touch(ctx, key, policy, admin_pin, force):
    """
    Manage touch policy for OpenPGP keys.

    \b
    KEY     Key slot to set (sig, enc or aut).
    POLICY  Touch policy to set (on, off or fixed).
    """
    controller = ctx.obj['controller']
    old_policy = controller.get_touch(key)

    if old_policy == TOUCH_MODE.FIXED:
        ctx.fail('A FIXED policy cannot be changed!')

    force or click.confirm('Set touch policy of {.name} key to {.name}?'.format(
        key, policy), abort=True, err=True)
    if admin_pin is None:
        admin_pin = click.prompt('Enter admin PIN', hide_input=True, err=True)
    controller.set_touch(key, policy, admin_pin.encode('utf8'))
Manage touch policy for OpenPGP keys.

    \b
    KEY     Key slot to set (sig, enc or aut).
    POLICY  Touch policy to set (on, off or fixed).