42. insertCharSequence

Parameter syntax:

first_character S second_character [ S third_character ]?

Makes it easy and intuitive inserting special characters by typing the same ordinary character two or three times in a row.

The first time first_character is typed, as expected, first_character is inserted at caret position. Example: the first time, you type '-' (an ordinary dash), you insert '-'.

The second time first_character is typed, previously inserted first_character is replaced by second_character. Example: the second time you type '-' , you insert a – special character.

The third time first_character is typed, previously inserted second_character is replaced by third_character. Example: the third time you type '-' , you insert a — special character. This, of course, requires third_character to have been specified, which is not mandatory.

Important

This command is useless unless bound to the action of typing first_character.

Characters may be specified literally, or by using their character entity name as defined in the DocBook DTD (whatever the schema to which the document is conforming), or by using the Unicode value of the character represented in hexadecimal (with a "0x" prefix), octal (with a "0" prefix) or decimal. See the examples below.

Examples (in the examples below, hexadecimal number 0x00ab is used to represent the French opening guillemet "«" and octal number 0273 is used to represent the French closing guillemet "»"):

<binding>
  <charTyped char="-" />
  <command name="insertCharSequence" parameter="- ndash mdash" />
</binding>

<binding>
  <charTyped char="&lt;" />
  <command name="insertCharSequence" parameter="&lt; 0x00ab" />
</binding>

<binding>
  <charTyped char="&gt;" />
  <command name="insertCharSequence" parameter="&gt; 0273" />
</binding>