Community
    • Login

    Entering ZWNJ Zero Width Non-Joiner

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 2.9k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Sohail MansorryS Offline
      Sohail Mansorry
      last edited by

      Hi
      I use ZWNJ (Zero Width Non-Joiner) and I do that A LOT because I am writing a book in a different language. I use an AutoHotKey script to act as a global hotkey for all of my software, including Google Chrome, Word, and Notepad. I have assigned ZWNJ to <Ctrl + Space> and Em-Dash to <Shift + Space>. In NotePad++ Em-Dash works, but ZWNJ does not (and giving administrator privileges to AutoHotKey does not solve the problem). I have had the same problem with other text editing applications as well (namely FocusReader). It appears Notepad++ and FocusReader refuse to accept ZWNJ as input, but they have no problem reading and displaying documents with this character.

      Since the ability to enter ZWNJ is vital, I must find an easy way to use it. Would anyone kindly help me?

      1 Reply Last reply Reply Quote 0
      • PeterJonesP Offline
        PeterJones
        last edited by

        I have two ideas:

        1. Is it the character or the keyboard shortcut that’s having the problem?

          • Try assigning the AutoHotKey sequence to something different for the ZWNJ insertion, and see if that helps.
          • Alternately: in my Settings > Shortcut Mapper, I see that Main Menu: #58: Function Completion is assigned to that key sequence; yours may be a different number, but you could try to select Function Completion and CLEAR its shortcut, and then try doing the Ctrl+Space shortcut again.
        2. If AHK cannot seem to insert it, even after playing with shortcuts, you might want a PythonScript solution.

          1. create a short script, and save it in the appropriate directory for PythonScripts (in a <executable directory>\plugins\PythonScript\scripts for Machine Scripts, or in %AppData%\Notepad++\plugins\PythonScript\scripts for User Scripts)

            editor.addText( u’\u200c’ )

          2. assign it as a menu item using Plugins > Python Script > Configuration, selecting the appropriate Machine or User scripts, clicking ADD

          3. assign it a shortcut via Settings > Shortcut Mapper > Plugin Commands

        (I verified the PythonScript version worked, though I had to use the PythonScript console to run editor.setRepresentation(u'\u200C', "ZWNJ") to confirm it had really inserted the right character, and editor.clearRepresentation(u'\u200C') once I knew it was really there.)

        1 Reply Last reply Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors