Custom scripts to add characters not on keyboard

Build 1501 on 14/Nov/2017  This topic last edited on: 21/Mar/2016, at 18:52

You may want to create custom scripts to insert characters not on keyboard. It’s just a normal custom scripting procedure, based on GN4 scripting command:

Ted.instext (chrW(lettercode))

Where lettercode is the UNICODE number of the letter, the same you find in the font metrics (Edadmi4 > Editorial Configuration > Fonts > select typography > double-click font, > Layout tab > Code column, e.g. to insert the letter é, it would be Ted.instext (chrW(233)):

Click to toggle graphic size

 

Thus, you need to write a custom script (one for each letter and each case to be added) similar to:

Sub InsLetterLowerCaseEAcute

   Ted.instext (chrW(233))

End sub

And then to add, in your custom ted4_tabitems.xml (<Menuset Name="TxtDesigner">), a line for each custom script above, such as:

<KeyBinding CommandType="Script" CommandParameter="InsLetterLowerCaseEAcute" Modifiers="Control" Key="1"/>

Take case not to use the shortcuts already used.

To take over an existing keyboard shortcut, comment out that line.