Show / Hide Table of Contents

SetTemporaryTouchThreshold Method

SetTemporaryTouchThreshold(int)

Temporarily set the threshold at which a capacitive touch should be considered active.

C#
public void SetTemporaryTouchThreshold(int value)

Parameters

Type Name Description
int value

The touch threshold to apply to the YubiKey. Must be a value greater than 6.

Implements

IYubiKeyDevice.SetTemporaryTouchThreshold(int)

Exceptions

Type Condition
NotSupportedException

The YubiKey does not support this feature.

ArgumentOutOfRangeException

The value is less than 6 or greater than 255.

InvalidOperationException

The YubiKey encountered an error and could not set the setting.

Remarks

The field is using arbitrary units and has a default value of `6`. A higher value increases the sensor threshold which has the effect of decreasing the sensitivity of the sensor. Lower values increase the sensitivity, but callers cannot reduce the threshold below the default value of `6` which is locked in at manufacturing time. The value should not be any higher than `255`.

The value set here is only valid until the next time the YubiKey is power cycled. It does not persist.

You should typically not ever need to adjust this value. This is primarily used in the context of automatic provisioning and testing where the YubiKey is being "touched" by electrically grounding the sensor.

In this article
Back to top Generated by DocFX