General Terminal

GtIsCtrl

Check whether a Ctrl key is held down

Syntax

Signature
xBool GtIsCtrl( void );

Arguments

No arguments.

Return value

T if a Ctrl key is held down, otherwise F.

Description

Reports the Ctrl modifier state recorded by the driver. Poll it while processing keyboard events.

Example

gtisctrl.c
#include "xdev-wtui.h"

#include <stdio.h>

int main( void )
{
   puts( "Hold Ctrl while the terminal waits." );
   Inkey( 3, NIL );
   printf( "Ctrl state: %s\n", GtIsCtrl() ? "on" : "off" );

   return 0;
}

See also