General Terminal

GtIsShift

Check whether a Shift key is held down

Syntax

Signature
xBool GtIsShift( void );

Arguments

No arguments.

Return value

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

Description

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

Example

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

#include <stdio.h>

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

   return 0;
}

See also