TERMKEY\_START(3) Library Functions Manual TERMKEY\_START(3)

# [NAME](#NAME)

termkey\_start, termkey\_stop, termkey\_is\_started - enable or disable terminal operations

# [SYNOPSIS](#SYNOPSIS)

```
#include <termkey.h>

int termkey_start(TermKey *tk);
int termkey_stop(TermKey *tk);

int termkey_is_started(TermKey *tk);
```

Link with *-ltermkey*.

# [DESCRIPTION](#DESCRIPTION)

**termkey\_start**() enables the terminal IO operations of the given [**termkey**(7)](/man/os/libtermkey/termkey.7) instance, including sending a terminal control sequence and setting the [**termios**(3)](/man/os/libtermkey/termios.3) modes required.

**termkey\_stop**() disables terminal IO operations, by reversing the steps taken by **termkey\_start**(). A newly-constructed **termkey** instance will have terminal IO enabled already.

**termkey\_is\_started**() enquires whether terminal IO is currently enabled.

# [RETURN VALUE](#RETURN_VALUE)

If successful, **termkey\_start**() and **termkey\_stop**() return a true value. On failure, zero is returned with *errno* set to indicate the failure. **termkey\_is\_started**() returns true or false to indicate whether terminal IO is currently enabled.

# [SEE ALSO](#SEE_ALSO)

[**termkey\_new**(3)](/man/os/libtermkey/termkey_new.3), [**termkey**(7)](/man/os/libtermkey/termkey.7)

---

Document: termkey_start(3) from libtermkey 0.22-r8 (Chainguard OS)
