• Curson On/Off

    From Alterego@1:103/705 to All on Monday, September 30, 2019 18: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!
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to Alterego on Monday, September 30, 2019 13: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
    --- SBBSecho 3.10-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)