FIDO_DEV_GET_TOUCH_BEGIN(3)
π FIDO_DEV_GET_TOUCH_BEGIN β library functions manual, bestie edition π
okay so this is the <fido_dev_get_touch_begin> / <fido_dev_get_touch_status> page from section 3 of the library functions manual, and honestly? it's giving "which finger do i tap, and which key" energy. let's get into it β¨
πΈ 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 on this page let an app asynchronously wait for a touch on a FIDO2 authenticator. asynchronously, meaning you're not just standing there staring at the key like ποΈπποΈ β you start the vibe and then check in on it.
Why do you care? because when you've got multiple authenticators plugged in / nearby and your app needs to figure out which one the human actually touched, this is how you find out. it's the "whose turn is it" of the FIDO2 world π
fido_dev_get_touch_begin()β kicks off a touch request ondev. that's it, that's the whole job. starts the request, no blocking, very main character of it.fido_dev_get_touch_status()β continues an ongoing touch request ondev, and it will block for up tomsmilliseconds while it waits. on success,touchedgets updated to reflect where the touch request is at β¨- if
touchedis1, bestie the device was touched β the touch request is now terminated. done. slayed. π - if
touchedis0, no touch yet, and the app may either callfido_dev_get_touch_status()again to keep the request rolling, or callfido_dev_cancel()to terminate it. your call, your journey π
- if
β RETURN VALUES β
The error codes that come back from fido_dev_get_touch_begin() and fido_dev_get_touch_status() are defined in <fido/err.h>. On success, you get FIDO_OK back, which is the little green checkmark moment we all deserve π«Ά
π EXAMPLES π
Please refer to examples/select.c in libfido2's source tree. go look, it's right there, i promise π
π SEE ALSO π
π CAVEATS π
not me dropping the important part at the bottom: fido_dev_get_touch_status() will cause a command to be transmitted to U2F authenticators. Those transmissions should not exceed a frequency of 5Hz. fr fr, do not spam your U2F key. it's not that kind of relationship π
and that's the page!! brought to you by the Debian crew, dated August 5, 2020 β ty for coming to my ted talk, now go touch some hardware π β¨
π¦ where this page comes from
- alpine 3.22: libfido2-doc 1.16.0-r0 Β· BSD-2-Clause
- alpine 3.23: libfido2-doc 1.16.0-r2 Β· BSD-2-Clause
- alpine 3.24: libfido2-doc 1.16.0-r4 Β· BSD-2-Clause
- arch rolling: libfido2 1.17.0-1 Β· BSD-2-Clause
- centos-stream 10: libfido2-devel 1.14.0-7.el10 Β· BSD-2-Clause
- centos-stream 9: libfido2-devel 1.13.0-2.el9 Β· BSD
- centos-stream 9: libfido2-devel 1.13.0-2.el9 Β· BSD
- debian bookworm: libfido2-doc 1.12.0-2 Β· BSD-2-Clause
- debian trixie: libfido2-doc 1.15.0-1 Β· BSD-2-Clause
- fedora 43: libfido2-devel 1.16.0-3.fc43 Β· BSD-2-Clause
- fedora 43: libfido2-devel 1.16.0-3.fc43 Β· BSD-2-Clause
- fedora 44: libfido2-devel 1.16.0-5.fc44 Β· BSD-2-Clause
- fedora 44: libfido2-devel 1.16.0-5.fc44 Β· BSD-2-Clause
- nixos 26.05: fido2-manage 0-unstable-2025-06-06
- nixpkgs unstable: fido2-manage 0-unstable-2025-06-06
- nixpkgs unstable: libfido2 1.17.0
- opensuse-leap 16.0: libfido2-devel 1.15.0-160000.3.2 Β· BSD-2-Clause
- opensuse-leap 16.0: libfido2-devel 1.15.0-160000.3.2 Β· BSD-2-Clause
- opensuse-leap 16.0: libfido2-devel 1.15.0-160000.3.2 Β· BSD-2-Clause
- opensuse-leap 16.0: libfido2-devel 1.15.0-160000.3.2 Β· BSD-2-Clause
- ubuntu noble: libfido2-doc 1.14.0-1build3 Β· BSD-2-Clause
- ubuntu questing: libfido2-doc 1.16.0-2
- ubuntu resolute: libfido2-doc 1.16.0-2build1 Β· BSD-2-Clause
- ubuntu stonking: libfido2-doc 1.17.0-2build1 Β· BSD-2-Clause
- π the page's license: BSD-2-Clause
- Copyright (c) 2020 Yubico AB. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms