Just started using Notepad++... What is SYN?



  • I have (of course) been using regular Notepad and just started using Notepad++. I have been using another keyboard macro program, AutoHotKey, which works great everywhere else… but in Notepad++, when I try to do a paste into a normal text file… here’s what the (Ctrl-Alt-W) macro produces here:
    (Haven’t crossed paths with him yet, but maybe that’ll happen this weekend?)
    (3/11/2017, 8:44:33 agh always a good way to spend a weekend)
    In Notepad++ instead I’m getting:
    )
    ( ()
    (where the square box here shows in Notepad++ as a white-on-black “SYN”). Anybody have an idea of what’s going on?
    Here’s what the Ctrl-Alt-W macro definition looks like for AutoHotKey:

    ^!w::
    Send {Home}{Home}{Space}{Space}(^V{Enter}{End}{End}{Up}{Up}{Up}{End}){Right}{Space}{Space}({End}{Space}{Space}{Delete}{End}){Home}{Down}
    return

    So anyhow, it looks like the ^V (which sends a Ctrl-V, or paste) isn’t pasting the saved clipboard text under Notepad++… ??



  • See https://en.wikipedia.org/wiki/Synchronous_Idle, n++ displays such ascii control characters as special symbols.



  • @Gordon-E.-Peterson-II I suspect you are using Ctrl-V to paste in the AutoHotKey script. Instead of that, try using Alt-E-P to select the Edit/Paste dropdown menu item.

    Typing Ctrl-V on a keyboard is “paste” for many applications including npp. Ctrl and a letter key also is used to generate the ASCII control codes. Ctrl-A is code 0x01, ctrl-B is code 0x02, ctrl-C is code 0x03, …, ctrl-V is code 0x16. ASCII code 0x16 is also known as the SYN or SYNC character. See the Wikipedia <a href=“https://en.wikipedia.org/wiki/ASCII”>ASCII</a> article for the list of control codes.

    Npp displays the three letter abbreviations for ASCII control codes when those characters appear in a file. As Ctrl-V is normally “paste” you can’t enter that directly in a file in most circumstances. It’s not clear why an AutoHotKey generated Ctrl-V is being interpreted as a desire to add an ASCII 0x16 SYN in the file rather than being handled as a paste.



  • It turns out that I occasionally have [SYN] show up when I’m editing. I just do Ctrl-Z for undo move on. It happened again and so this time I paid more attention to what I’d just done.

    • Ctrl-V is paste
    • Shift-Ctrl-V allows you to type a [SYN] character (character code \x16) in Notepad++

    Thus it seems that while you intended to transmit Ctrl-V via AutoHotKey that Shift-Ctrl-V was sent instead.



  • @Gordon-E-Peterson-II, I had such a problem in the past using autohotkey to paste into np++. I remember being advised to instead of using ^v, use send {ctrl down}v{ctrl up}. It is supposed to be more reliable
    I remember that it did help, but I havent used it in a while so I can’t verify now

    Let us know if that works



  • I do not use AutoHotKey but I also get this SYN thing when I try to paste with Ctrl+V. I have been using Npp for years and this is, I believe, the first time it happens.

    What could it be and what should I do to get back the default behavior?

    Many thanks!


    Windows 7 SP1 (x86),
    Npp v7.5.6



  • I am using Autohotkey, and what worked for me is adding an ‘$’ before the hotkey as in ‘$^v::’ (Ctrl+v). Read about the prefix ‘$’ here: https://www.autohotkey.com/docs/Hotkeys.htm


Log in to reply