---
name: "fido_dev_get_touch_begin"
section: "3"
platform: "linux"
package: "libfido2"
version: "1.17.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/fido_dev_get_touch_begin"
---

# fido\_dev\_get\_touch\_begin(3)

asynchronously wait for touch on a FIDO2 authenticator

## NAME

**fido\_dev\_get\_touch\_begin**, **fido\_dev\_get\_touch\_status** – asynchronously wait for touch on a FIDO2 authenticator

## SYNOPSIS

**#include \<fido.h\>**

*int*\

**fido\_dev\_get\_touch\_begin**(*fido\_dev\_t \*dev*);

*int*\

**fido\_dev\_get\_touch\_status**(*fido\_dev\_t \*dev*, *int \*touched*, *int ms*);

## DESCRIPTION

The functions described in this page allow an application to asynchronously wait for touch on a FIDO2 authenticator. This is useful when multiple authenticators are present and the application needs to know which one to use.

The **fido\_dev\_get\_touch\_begin**() function initiates a touch request on *dev*.

The **fido\_dev\_get\_touch\_status**() function continues an ongoing touch request on *dev*, blocking up to *ms* milliseconds. On success, *touched* will be updated to reflect the touch request status. If *touched* is 1, the device was touched, and the touch request is terminated. If *touched* is 0, the application may call **fido\_dev\_get\_touch\_status**() to continue the touch request, or **fido\_dev\_cancel**() to terminate it.

## RETURN VALUES

The error codes returned by **fido\_dev\_get\_touch\_begin**() and **fido\_dev\_get\_touch\_status**() are defined in ⟨fido/err.h⟩. On success, FIDO\_OK is returned.

## EXAMPLES

Please refer to *examples/select.c* in *libfido2's* source tree.

## SEE ALSO

[fido\_dev\_cancel(3)](/fido_dev_cancel/3.md)

## CAVEATS

The **fido\_dev\_get\_touch\_status**() function will cause a command to be transmitted to U2F authenticators. These transmissions should not exceed a frequency of 5Hz.
