General Terminal

GtSetCapsLock

Change the Caps Lock state

Syntax

Signature
void GtSetCapsLock( xBool on );

Arguments

on enables the setting with T or disables it with F.

Return value

No return value.

Description

Uses the Caps Lock bit in the driver’s keyboard state. Support for changing the operating-system state depends on the driver. Check the resulting state with GtIsCapsLock().

Example

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

#include <stdio.h>

int main( void )
{
   xBool previous = GtIsCapsLock();

   GtSetCapsLock( T );
   printf( "Caps Lock state: %s\n", GtIsCapsLock() ? "on" : "off" );
   GtSetCapsLock( previous );

   return 0;
}

See also