Skip to main content

BEL

AI-Generated Content
This page was generated with the assistance of AI and may contain inaccuracies. It is intended as a placeholder for future human verification. If you spot issues ahead of its initial review, please report them on GitHub!
Standard

BEL (Bell) is a C0 control character that signals the terminal to alert the user. Originally this triggered an audible tone on hardware terminals; modern terminal emulators typically support both audible and visual bell modes.

Syntax​

BEL       0x07
Formal syntax
BEL = 0x07 ;

Description​

Per ECMA-48 §8.3.3, BEL "is used when there is a need to call for attention; it may control alarm or attention devices."

The effect of BEL is implementation-defined. On the original DEC VT100 and VT510, it sounded a hardware bell tone (if enabled in the keyboard setup). Modern terminal emulators typically offer a choice between:

  • Audible bell — playing a system alert sound
  • Visual bell — briefly flashing the terminal window or titlebar
  • No bell — silently ignoring the character

Most terminals also set an "urgent" or "attention" hint on the window when a bell fires in a background tab or unfocused window.

Use as OSC terminator​

BEL (0x07) is widely accepted as an alternative string terminator for OSC sequences in place of ST (0x9C or ESC \). This convention originated in early XTerm (X11R4, December 1989) and has become a de facto standard across virtually all modern terminal emulators. Many programs prefer BEL as the OSC terminator because it is a single byte and avoids the ambiguity of the two-byte ESC \ sequence inside certain contexts.

Examples​

printf '\a'          # Ring the bell (POSIX shell)
printf '\x07' # Same, using hex escape

Specifications​

SpecificationSection
ECMA-48§8.3.3

Terminal support​

TerminalSupportVersionNotes
Terminal Emulators
Alacritty✓YesHandler bell() at term/mod.rs:1437 sends Event::Bell
Bobcat✓0.9.0Handled via WhenBell callback, audible bell implemented in Terminal.cpp:991
contour✓v0.1.0Implemented in executeControlCode; calls Terminal::bell()
foot✓YesImplemented in vt.c:131-133, calls term_bell()
Ghostty✓v1.0.0Handled in stream.zig:767 as C0.BEL (0x07)
iTerm2✓Yes
Kitty✓Yes
Konsole✓YesEmits bell signal
mintty✓YesHandled in do_ctrl() at src/termout.c:1689
mlterm✓rel-0_2_1
PuTTY✓0.45
Rio✓v0.0.28
rxvt-unicode✓rxvt-unicode-1.2
st✓0.6
terminology✓v0.1.0
VT100✓Yes
VTE✓Yes
WezTerm✓YesHandled in performer.rs:451 via ControlCode::Bell, triggers Alert::Bell
Windows Terminal✓YesHandled via WarningBell() dispatch method in OutputStateMachineEngine.cpp:56-57
xterm✓YesImplemented in charproc.c:3685. Visual/audible bell via Bell() function
xterm.js✓2.3.0
Multiplexers
cy✓v0.1.0Handler present but no actual bell output
GNU Screen✓v.4.2.0Implemented in Special() function at src/ansi.c:691
tmux✓0.8Triggers window bell alert via alerts_queue()
tuios✓v0.0.15
Zellij✓v0.24.0

See also​