• Curson On/Off

    From Alterego@VERT/ALTERANT to All on Monday, September 30, 2019 17:09:20
    When coding in javascript, is there a console.method() or ctrl-a sequence to turn the cursor on and off? (IE: ESC[?25h and ESC[?25l)
    ...ëîå*

    ... Conscience is what hurts when everything else feels so good.

    ---
    þ Synchronet þ Alterant | an SBBS in Docker on Pi!
  • From Digital Man@VERT to Alterego on Monday, September 30, 2019 12:34:52
    Re: Curson On/Off
    By: Alterego to All on Mon Sep 30 2019 05:09 pm

    When coding in javascript, is there a console.method() or ctrl-a sequence to turn the cursor on and off? (IE: ESC[?25h and ESC[?25l)

    No console method explicitly for that, but there is an ansiterm library you can load and use like this:

    var ansiterm = load({}, 'ansiterm_lib.js');
    ansiterm.send("ext_mode", "clear", "cursor");
    console.pause(); // cursor should be gone for compatible terminals (e.g. SyncTERM)
    ansiterm.send("ext_mode", "set", "cursor");
    // cursor should now be visible again

    digital man

    This Is Spinal Tap quote #9:
    David St. Hubbins: I mean, it's not your job to be as confused as Nigel.
    Norco, CA WX: 69.4øF, 49.0% humidity, 7 mph E wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net