From d2f532fa554502271149813e961b1af590bb21cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Sun, 18 Aug 2019 21:11:40 +0200 Subject: [PATCH] Add documentation for BELL signal --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index d1517f7..ea8f2dc 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ without requiring any extensions or special installation. * [History](#history) * [Autocomplete](#autocomplete) * [Keys](#keys) + * [Bell](#bell) * [Readline](#readline) * [Pitfalls](#pitfalls) * [Install](#install) @@ -534,6 +535,23 @@ $stdio->on("\033[A", function () use ($stdio) { }); ``` +#### Bell + +By default, this project will emit a audible/visible BELL signal when the user +tries to execute an otherwise disabled function, such as using the +left or backspace keys when already at the beginning of the line. + +Whether or not the BELL is audible/visible depends on the termin and its +settings, i.e. some terminals may "beep" or flash the screen or emit a short +vibration. + +The `setBell(bool $bell): void` method can be used to +enable or disable emitting the BELL signal when using a disabled function: + +```php +$stdio->setBell(false); +``` + ### Readline The deprecated `Readline` class is responsible for reacting to user input and