DownPressed

Availability All terminals
Description This function returns the current state of the function key (previously called 'down key' on other terminals). The function key can be either pressed or not pressed.
Syntax int DownPressed( void );
Arguments None
Returns
>= 1 The function key is pressed
0 The function key is not pressed
Remarks When the function key is pressed this event is interpreted as a key stroke. The key stroke is placed in the keyboard buffer as CLR_KEY, so the function getchar() will return the key stroke as CLR_KEY.

Since the OPN only has a trigger and fuction key, the keys DOWN_KEY and UP_KEY are defined as the same key (CLR_KEY). Therefore DownPressed() and uppressed() will both return TRUE if the function key is pressed.
Example
// This example will sound the buzzer when the trigger key is being pressed

#include <stdio.h>
#include "lib.h"

void main( void )
{
    for(;;)
    {
        printf("\nPress any key!");
        if( TriggerPressed() )
            Sound( TSTANDARD, VHIGH, SMEDIUM, 0);
        if( DownPressed() )
            Sound( TSTANDARD, VHIGH, SLOW, 0);
        Idle();
    }
}