1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

BackSpace

Discussion in 'Support' started by Roedy, Jul 28, 2016.

  1. Roedy

    Joined:
    Jun 8, 2008
    Messages:
    120
    Likes Received:
    2
    Sometimes TCC displays a backspace as a control character. Sometimes it filters it out. I have not figured out how it decides how to behave.

    I think TEE always filters both the log and the stream.
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,855
    Likes Received:
    83
    Console window or TCMD tab window?

    Version of TCC?

    Version of Windows?

    Syntax / command you're using?
     
  3. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,939
    Likes Received:
    30
    Just experimenting, I found a few things that make me curious.

    With ECHO and TYPE, BS is handled differently when it's at the end of a string from when it's not at the end.
    Code:
    v:\> echo ab%@char[8]
    ab
    
    v:\> echo ab%@char[8]cd
    acd
    I could not find a way to get BS shown as a symbol (glyph?).

    Many other control characters, when input, appear as the default unprintable box, while, on output, appear as the more familiar symbol.
    If, for example, I input Ctrl-z I see
    Code:
    v:\> <default box character here>
    TCC: Unknown command "→"
     
  4. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,855
    Likes Received:
    83
    WAD. A backspace character is not destructive (i.e., not the same as a delete character). It just moves the cursor. At an EOL, it moves it back one character but you don't see it since you immediately do a CR/LF.

    This is all normal Windows console behavior; TCC isn't doing anything special with those characters.
     
  5. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,939
    Likes Received:
    30
    What about the control character glyphs not appearing upon TCC input when using a Unicode font?

    After all these years, I still expect to see an up-arrow when I press Ctrl-x (the 4DOS escape character).

    They do appear in TC (same font, Andale Mono) and they also appear in TCC when using Terminal font.
     
  6. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,939
    Likes Received:
    30
    Here's a good example. I get the glyph on output and in the history, but not on input.

    upload_2016-7-29_12-0-48.png
     
  7. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,855
    Likes Received:
    83
    The only way TCC could be involved is if you defined those keystrokes as macros or key aliases, or if you have an input color defined.

    If you have an input color, TCC writes the character out using WriteConsoleOutputCharacter. Otherwise, it writes it using WriteConsole.

    Either way, the resulting display is determined by Windows and by your font of choice, not TCC.
     
  8. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,939
    Likes Received:
    30
    I did have bright yellow on black input. When I switched to "default", I see the glyphs.

    Odd, though, with Terminal font, I see the glyphs even with custom input colors

    Can't you use WriteConsoleOutputCharacter in both cases? It's a shame that using a custom input color together with a Unicode font clobbers those glyphs.
     
  9. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,855
    Likes Received:
    83
    ?? Then you wouldn't see it in either case. And it would be slower. And it wouldn't support redirection.

    And why the sudden interest in seeing unprintable characters? Do you actually have a need for them?
     
  10. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,939
    Likes Received:
    30
    I have no particular need for them on the input line. They've been missing since at least 4NTv8 and I didn't miss them. I'm just being curious as usual
     

Share This Page