Skip to content
Snippets Groups Projects
Commit 79a7de7e authored by deuce's avatar deuce
Browse files

Add support for ^G (beep)

parent 4d0e5333
No related branches found
No related tags found
No related merge requests found
......@@ -13,6 +13,7 @@ function handleCtrl(byte)
{
var term=document.getElementById("frame").contentDocument.getElementById("terminal");
var win=document.getElementById("frame").contentWindow;
const sound = Components.classes["@mozilla.org/sound;1"].createInstance(Components.interfaces.nsISound);
switch(byte) {
case '\n':
......@@ -26,6 +27,9 @@ function handleCtrl(byte)
case '\x0c': // Formfeed -- clear screen
term.innerHTML = '';
break;
case '\x07': // BEL
sound.beep();
break;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment