curs\_beep(3X) Library calls curs\_beep(3X)

# [NAME](#NAME)

**beep**, **flash** - ring the (visual) bell of the terminal with *curses*

# [SYNOPSIS](#SYNOPSIS)

```
#include <curses.h>
```

```
int beep(void);
int flash(void);
```

# [DESCRIPTION](#DESCRIPTION)

**beep** and **flash** alert the terminal user: the former by sounding the terminal's audible alarm, and the latter by visibly attracting attention. Commonly, a terminal implements a visual bell by momentarily reversing the character foreground and background colors on the entire display; even a monochrome device can do this. These functions each attempt the other alert type if the one requested is unavailable. If neither is available, *curses* performs no action. Nearly all terminals have an audible alert mechanism such as a bell or piezoelectric buzzer, but only some can flash the screen.

# [RETURN VALUE](#RETURN_VALUE)

These functions return **OK** on success and **ERR** on failure.

In *ncurses*, **beep** and **flash** return **OK** if the terminal type supports the corresponding capability: **bell** (**bel**) for **beep** and **flash\_screen** (**flash**) for **flash**. Otherwise they return **ERR**.

# [EXTENSIONS](#EXTENSIONS)

In *ncurses*, these functions can return **ERR**.

# [PORTABILITY](#PORTABILITY)

X/Open Curses Issue 4 describes these functions. It specifies no error conditions for them.

On SVr4 *curses*, they always return *OK*, and X/Open Curses specifies them as doing so.

# [HISTORY](#HISTORY)

SVr2 (1984) introduced *beep* and *flash*.

# [SEE ALSO](#SEE_ALSO)

[**curses**(3X)](/man/os/ncurses/curses.3X), [**terminfo**(5)](/man/os/ncurses/terminfo.5)

2025-02-01 ncurses 6.6

---

Document: curs_beep(3x) from ncurses 6.6.20261031-r0 (Chainguard OS)
Source: https://github.com/ThomasDickey/ncurses-snapshots
