---
name: "termkey_canonicalise"
section: "3"
platform: "linux"
package: "libtermkey-dev"
version: "0.22-2+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/termkey_canonicalise"
---

# termkey\_canonicalise(3)

canonicalise a key event

## NAME

termkey\_canonicalise - canonicalise a key event

## SYNOPSIS

```
#include <termkey.h>

void termkey_canonicalise(TermKey *tk, TermKeyKey *key);
```

Link with *-ltermkey*.

## DESCRIPTION

[**termkey\_canonicalise**(3)](/termkey_canonicalise/3.md) modifies the key event structure given by *key* according to the canonicalisation flags set on the given **termkey** instance. This operation is performed implicitly by [**termkey\_getkey**(3)](/termkey_getkey/3.md), [**termkey\_waitkey**(3)](/termkey_waitkey/3.md) and [**termkey\_strpkey**(3)](/termkey_strpkey/3.md), and is also provided explicitly by this function.

See [**termkey**(7)](/termkey/7.md) for a list of canonicalisation flags.

## RETURN VALUE

**termkey\_canonicalise**() returns no value.

## SEE ALSO

[**termkey\_set\_canonflags**(3)](/termkey_set_canonflags/3.md), [**termkey\_waitkey**(3)](/termkey_waitkey/3.md), [**termkey\_strpkey**(3)](/termkey_strpkey/3.md), [**termkey**(7)](/termkey/7.md)
