Syntax
xBool GtSysMenuAdd( int key, const char *caption );
Arguments
key is the input code to queue when the command is selected.
caption is the menu label. Pass NULL to remove the command for this key.
Return value
T if the driver reports success, otherwise F.
Description
On supported drivers, the application reads the queued code through Inkey() as it would a keyboard event.
Example
#include "xdev-wtui.h"
#include <stdio.h>
int main( void )
{
if( !GtSysMenuAdd( 'M', "Show status" ) )
{
puts( "The driver did not add the command." );
return 1;
}
QOut( "Choose Show status from the system menu within five seconds." );
if( Inkey( 5, NIL ) == 'M' )
puts( "System menu command received." );
GtSysMenuAdd( 'M', NULL );
return 0;
}