mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
If bell() gets called emit bell event and add default bell sound
This commit is contained in:
+6
-1
@@ -7,6 +7,7 @@ import { C0 } from './EscapeSequences';
|
||||
import { DEFAULT_CHARSET } from './Charsets';
|
||||
import { CharData } from './Types';
|
||||
import { CHAR_DATA_CHAR_INDEX, CHAR_DATA_WIDTH_INDEX } from './Buffer';
|
||||
import { Bell } from './utils/Bell';
|
||||
|
||||
/**
|
||||
* The terminal's standard implementation of IInputHandler, this handles all
|
||||
@@ -106,7 +107,11 @@ export class InputHandler implements IInputHandler {
|
||||
* Bell (Ctrl-G).
|
||||
*/
|
||||
public bell(): void {
|
||||
if (!this._terminal.options.visualBell) {
|
||||
this._terminal.emit('bell');
|
||||
if (this._terminal.playDefaultBell) {
|
||||
(new Audio(Bell)).play();
|
||||
}
|
||||
if (!this._terminal.visualBell) {
|
||||
return;
|
||||
}
|
||||
this._terminal.element.style.borderColor = 'white';
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user