Entering ZWNJ Zero Width Non-Joiner
Sohail Mansorry last edited by
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?
PeterJones last edited by
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 that
Main Menu: #58: Function Completionis assigned to that key sequence; yours may be a different number, but you could try to select
CLEARits shortcut, and then try doing the
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, clicking
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.)