General Terminal

GtIsCapsLock

Check whether Caps Lock is on

Syntax

Signature
xBool GtIsCapsLock( void );

Arguments

No arguments.

Return value

T if Caps Lock is on, otherwise F.

Description

Uses the Caps Lock bit in the driver’s keyboard state. Support for changing the operating-system state depends on the driver.

Example

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

#include <stdio.h>

int main( void )
{
   printf( "Caps Lock state: %s\n", GtIsCapsLock() ? "on" : "off" );

   return 0;
}

See also