Defining SDC softkeys

A softkey definition contains:

You can use these softkey definitions in any of the functions that you define later in the SDC file.

The syntax of a softkey definition is:

softkey softkey_ref : "full_label" : "short_label"
{
      statement 1;
      ...
      statement n;
}

where:

softkey_ref
The name that is to be associated with this softkey definition. This name must be an ASCII value that is unique in the file. It can have a maximum of 20 characters.
full_label
A string that is used to label a softkey that is in the virtual key table. It can have a maximum of 18 characters.
short_label
A string that is displayed to identify the key to the user. It can have a maximum of 7 characters.
statement 1 ... statement n
A list of SDC softkey return string statements. This represents a sequential list of actions that the ADSI telephone performs when the user presses the softkey.

For more information, see softkey.

Here is an example of a softkey definition:

softkey SK1 : "Display time" : "Time"
{
      send_dtmf "1";
}

In this example, the label Time is displayed on a key that is assigned this definition. When the key is pressed, the DTMF tone for 1 is dialed.

The definition of softkeys is the same both for SDC and for FDM mode. However, opcodes 0x98 to 0xa0 cannot be used for SDC operations because adsicomp does not recognize the equivalent statements for these opcodes. If you try to use these operations, they are flagged as a syntax error.