Entering ZWNJ Zero Width Non-Joiner
-
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?
-
I have two ideas:
-
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 thatMain Menu: #58: Function Completionis assigned to that key sequence; yours may be a different number, but you could try to selectFunction CompletionandCLEARits shortcut, and then try doing theCtrl+Spaceshortcut again.
-
If AHK cannot seem to insert it, even after playing with shortcuts, you might want a PythonScript solution.
-
create a short script, and save it in the appropriate directory for PythonScripts (in a
<executable directory>\plugins\PythonScript\scriptsfor Machine Scripts, or in%AppData%\Notepad++\plugins\PythonScript\scriptsfor User Scripts)editor.addText( u’\u200c’ )
-
assign it as a menu item using
Plugins > Python Script > Configuration, selecting the appropriate Machine or User scripts, clickingADD -
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, andeditor.clearRepresentation(u'\u200C')once I knew it was really there.) -
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