If bell() gets called emit bell event and add default bell sound

This commit is contained in:
npezza93
2017-08-16 20:39:15 -04:00
parent f3d375a7a8
commit 245f62685a
2 changed files with 7 additions and 1 deletions
+6 -1
View File
@@ -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