curs_beep(3x) — Linux manual page

NAME | SYNOPSIS | DESCRIPTION | RETURN VALUE | EXTENSIONS | PORTABILITY | HISTORY | SEE ALSO | COLOPHON

curs_beep(3X)                 Library calls                 curs_beep(3X)

NAME         top

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

SYNOPSIS         top

       #include <curses.h>

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

DESCRIPTION         top

       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         top

       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         top

       In ncurses, these functions can return ERR.

PORTABILITY         top

       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         top

       SVr2 (1984) introduced beep and flash.

SEE ALSO         top

       curses(3X), terminfo(5)

COLOPHON         top

       This page is part of the ncurses (new curses) project.
       Information about the project can be found at 
       ⟨https://invisible-island.net/ncurses/ncurses.html⟩.  If you have a
       bug report for this manual page, send it to bug-ncurses@gnu.org.
       This page was obtained from the tarball ncurses-6.6.tar.gz fetched
       from ⟨https://ftp.gnu.org/gnu/ncurses/⟩ on 2026-01-16.  If you
       discover any rendering problems in this HTML version of the page,
       or you believe there is a better or more up-to-date source for the
       page, or you have corrections or improvements to the information
       in this COLOPHON (which is not part of the original manual page),
       send a mail to man-pages@man7.org

ncurses @NCURSES_MAJOR@.@NCU... 2025-02-01                  curs_beep(3X)