Skip to content
Snippets Groups Projects
Commit f9c9f292 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Use ansiterm_lib.js for constructing ANSI mouse reporting set/clear sequences

Code beautification, no functional change other than we're not clearing mouse
mode 1016 since I don't have a definiton for that mode yet.
parent 4d087182
No related branches found
No related tags found
No related merge requests found
......@@ -118,7 +118,7 @@ log(LOG_DEBUG, title + " options: " + JSON.stringify(options));
function mouse_enable(enable)
{
if (graph) {
console.write("\x1b[?1003;1006"+(enable ? 'h' : 'l'));
ansiterm.send('mouse', enable ? 'set' : 'clear', ['any_events', 'extended_coord']);
return;
}
const mouse_passthru = (CON_MOUSE_CLK_PASSTHRU | CON_MOUSE_REL_PASSTHRU);
......@@ -1245,7 +1245,8 @@ function detect_graphics()
console.ctrlkey_passthru = tmpckpt;
if (graph) {
console.mouse_mode = false;
console.write("\x1b[?9;1000;1001;1002;1004;1005;1007;1015;1016l\x1b[?1003;1006h");
ansiterm.send('mouse', 'clear', 'all');
ansiterm.send('mouse', 'set', ['any_events', 'extended_coord']);
js.on_exit("console.write('\x1b[?1003;1006l;'); console.mouse_mode = orig_mouse; user.misc = orig_misc; console.autoterm = orig_autoterm;");
}
}
......
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